From efe72c845ece9ba7d0f32383a0c9d0894f5d0eaa Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Wed, 27 Jul 2011 09:59:19 -0400 Subject: [PATCH] Don't show users who are already logged in a login form; that's confusing Signed-off-by: Lebbeous Fogle-Weekley --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm index b1d64830a7..a23cf3d5ac 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm @@ -102,7 +102,16 @@ sub load { # ---------------------------------------------------------------- if($path =~ m|opac/login|) { return $self->redirect_ssl unless $self->cgi->https; - return $self->load_login; + return $self->load_login unless $self->editor->requestor; # already logged in? + + # This will be less confusing to users than to be shown a login form + # when they're already logged in. + return $self->generic_redirect( + sprintf( + "https://%s%s/myopac/main", + $self->apache->hostname, $self->ctx->{opac_root} + ) + ); } if($path =~ m|opac/logout|) { -- 2.11.0