21 defined(
'XOOPS_ROOT_PATH') or die('Restricted access');
44 static $auth_instance;
45 if (!isset($auth_instance)) {
49 include_once
$GLOBALS[
'xoops']->path(
'class/auth/auth.php');
51 if (empty($authConfig[
'auth_method'])) {
52 $xoops_auth_method =
'xoops';
54 $xoops_auth_method = $authConfig[
'auth_method'];
57 if (in_array(
$uname, $authConfig[
'ldap_users_bypass'])) {
58 $xoops_auth_method =
'xoops';
61 $ret = include_once
$GLOBALS[
'xoops']->path(
'class/auth/auth_' . $xoops_auth_method .
'.php');
66 $class =
'XoopsAuth' . ucfirst($xoops_auth_method);
67 if (!class_exists($class)) {
71 switch ($xoops_auth_method) {
82 $auth_instance =
new $class($dao);
84 return $auth_instance;