LP1579144: On Login, Send Location to ILS
authorMike Rylander <mrylander@gmail.com>
Wed, 10 Aug 2016 12:47:08 +0000 (08:47 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 10 Aug 2016 12:47:08 +0000 (08:47 -0400)
In addition to supporting client-side location code for login, allow
a fallback value to be set in the configuration file, per account.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Sip/MsgType.pm

index 47df859..0f51459 100644 (file)
@@ -856,6 +856,7 @@ sub handle_login {
         syslog("LOG_WARNING", "MsgType::handle_login: Invalid password for login '$uid'");
         $status = 0;
     } else {
+        $sc_loc ||= $server->{config}->{accounts}->{$uid}->{location_code};
         _load_ils_handler($server, $uid, $sc_loc);
     }