"next" doesn't work if you're not in a for loop feature/ldap_osul_2_7
authorDan Scott <dscott@laurentian.ca>
Thu, 11 Sep 2014 01:36:29 +0000 (21:36 -0400)
committerDan Scott <dscott@laurentian.ca>
Tue, 11 Nov 2014 19:10:00 +0000 (14:10 -0500)
This was causing grievous "Internal server error" problems
when people actually did enter their email address. More
robust, more better. Yay.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm

index 60c9980..1e03918 100644 (file)
@@ -419,9 +419,7 @@ sub load_login {
         $args->{barcode} = $username;
     } else {
         # do we need to append an email hostname?
-        if ($ou_email_host) {
-            # Assume they already passed in an email address
-            next if $username =~ m/\@/;
+        if ($ou_email_host and $username !~ m/\@/) {
             $username .= "\@$ou_email_host";
         }
         $args->{username} = $username;