return after reading subusers infos
Bernd Wurst

Bernd Wurst commited on 2024-02-05 07:34:31
Zeige 1 geänderte Dateien mit 2 Einfügungen und 1 Löschungen.

... ...
@@ -300,12 +300,13 @@ function setup_session($role, $useridentity, $loginmethod = 'password')
300 300
         $data = db_query("SELECT kundenaccount FROM system.useraccounts WHERE username=?", [$info['username']]);
301 301
         if ($entry = $data->fetch()) {
302 302
             if ($entry['kundenaccount'] == 1) {
303
-                $customer = get_customer_info($_SESSION['userinfo']['username']);
303
+                $customer = get_customer_info($_SESSION['userinfo']['customerno']);
304 304
                 $_SESSION['customerinfo'] = $customer;
305 305
                 $_SESSION['role'] = ROLE_SYSTEMUSER | ROLE_CUSTOMER | ROLE_SUBUSER;
306 306
             }
307 307
         }
308 308
         logger(LOG_INFO, "session/start", "login", "logged in user »{$info['username']}«");
309
+        return;
309 310
     }
310 311
     if ($role & ROLE_SYSTEMUSER) {
311 312
         DEBUG("We are system user");
312 313