Don't break TPAC with email address usernames
authorDan Scott <dscott@laurentian.ca>
Sun, 11 Nov 2012 21:41:23 +0000 (16:41 -0500)
committerDan Scott <dscott@laurentian.ca>
Sun, 11 Nov 2012 21:43:31 +0000 (16:43 -0500)
"next if..." is not valid if you're not inside a loop. Sheesh.

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

index 9606e9c..6c88f83 100644 (file)
@@ -388,8 +388,9 @@ sub load_login {
         # do we need to append an email hostname?
         if ($ou_email_host) {
             # Assume they already passed in an email address
-            next if $username =~ m/\@/;
-            $username .= "\@$ou_email_host";
+            if ($username !~ m/\@/) {
+                $username .= "\@$ou_email_host";
+            }
         }
         $args->{username} = $username;
     }