summaryrefslogtreecommitdiff
path: root/include/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-12-27 15:14:44 +0400
committerAndrew Dolgov <[email protected]>2012-12-27 15:14:44 +0400
commit0f28f81f8911e432ae4bf50da7ed2c334618fd95 (patch)
treec5684bedb1ad6b62840c30c730b868934a44b48e /include/functions.php
parent61261e45b90f6d0582cd338a1a3c9cf0c8a599ce (diff)
move authentication modules to plugins/
Diffstat (limited to 'include/functions.php')
-rw-r--r--include/functions.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/functions.php b/include/functions.php
index d03fcfb15..f6ef7c2b3 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -547,7 +547,7 @@
if (!SINGLE_USER_MODE) {
$user_id = false;
- $modules = explode(",", AUTH_MODULES);
+ /* $modules = explode(",", AUTH_MODULES);
foreach ($modules as $module) {
$module_class = "auth_$module";
@@ -565,6 +565,17 @@
print T_sprintf("Fatal: authentication module %s not found.", $module);
die;
}
+ } */
+
+ global $pluginhost;
+ foreach ($pluginhost->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));
+ break;
+ }
}
if ($user_id && !$check_only) {