]> git.wh0rd.org Git - tt-rss.git/commitdiff
properly save auth_module after logging in
authorAndrew Dolgov <noreply@fakecake.org>
Tue, 16 Oct 2018 04:34:22 +0000 (07:34 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Tue, 16 Oct 2018 04:34:22 +0000 (07:34 +0300)
include/functions.php

index f5837e51c000285a44072ddf750751391de0c193..a04a393ec3382c4fd852080e756f3cbc3e2d5e61 100755 (executable)
 
                if (!SINGLE_USER_MODE) {
                        $user_id = false;
+                       $auth_module = false;
 
                        foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_AUTH_USER) as $plugin) {
 
                                $user_id = (int) $plugin->authenticate($login, $password);
 
                                if ($user_id) {
-                                       $_SESSION["auth_module"] = strtolower(get_class($plugin));
+                                       $auth_module = strtolower(get_class($plugin));
                                        break;
                                }
                        }
 
                                $_SESSION["uid"] = $user_id;
                                $_SESSION["version"] = VERSION_STATIC;
+                               $_SESSION["auth_module"] = $auth_module;
 
                                $pdo = DB::pdo();
                                $sth = $pdo->prepare("SELECT login,access_level,pwd_hash FROM ttrss_users