summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-10-16 07:34:22 +0300
committerAndrew Dolgov <[email protected]>2018-10-16 07:34:22 +0300
commit9dadbdbb218885f213f05915943ce3142b2cfcd8 (patch)
tree77bd0b53dd0ee05ddf3919f0142dee536aadcdb4 /include
parent77aebd7e4a28ba10b07d8ec697cc84cc4a810777 (diff)
properly save auth_module after logging in
Diffstat (limited to 'include')
-rwxr-xr-xinclude/functions.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/functions.php b/include/functions.php
index f5837e51c..a04a393ec 100755
--- a/include/functions.php
+++ b/include/functions.php
@@ -700,13 +700,14 @@
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;
}
}
@@ -723,6 +724,7 @@
$_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