Public Member Functions

ilAuthUtils Class Reference

Public Member Functions

 _getAuthModeOfUser ($a_username, $a_password, $a_db_handler= '')
 _getAuthMode ($a_auth_mode, $a_db_handler= '')
 _getAuthModeName ($a_auth_key)
 _getActiveAuthModes ()

Detailed Description

Definition at line 34 of file class.ilAuthUtils.php.


Member Function Documentation

ilAuthUtils::_getActiveAuthModes (  ) 

Definition at line 132 of file class.ilAuthUtils.php.

References $ilias.

Referenced by ilObjUserGUI::createObject(), ilObjUserGUI::editObject(), and ilObjAuthSettingsGUI::viewObject().

        {
                global $ilias;
                
                $modes = array(
                                                'default'       => $ilias->getSetting("auth_mode"),
                                                'local'         => AUTH_LOCAL
                                                );
                
                if ($ilias->getSetting("ldap_active")) $modes['ldap'] = AUTH_LDAP;
                if ($ilias->getSetting("radius_active")) $modes['radius'] = AUTH_RADIUS;
                if ($ilias->getSetting("shibboleth_active")) $modes['shibboleth'] = AUTH_SHIBBOLETH;
                if ($ilias->getSetting("script_active")) $modes['script'] = AUTH_SCRIPT;

                return $modes;
        }

Here is the caller graph for this function:

ilAuthUtils::_getAuthMode ( a_auth_mode,
a_db_handler = '' 
)

Definition at line 57 of file class.ilAuthUtils.php.

References $q, and $row.

Referenced by _getAuthModeOfUser(), and ilObjUser::getAuthMode().

        {
                global $ilDB;
                
                $db =& $ilDB;
                
                if ($a_db_handler != '')
                {
                        $db =& $a_db_handler;
                }

                switch ($a_auth_mode)
                {
                        case "local":
                                return AUTH_LOCAL;
                                break;
                                
                        case "ldap":
                                return AUTH_LDAP;
                                break;
                                
                        case "radius":
                                return AUTH_RADIUS;
                                break;
                                
                        case "script":
                                return AUTH_SCRIPT;
                                break;
                                
                        case "shibboleth":
                                return AUTH_SHIBBOLETH;
                                break;
                                
                        default:
                                $q = "SELECT value FROM settings WHERE ".
                                         "keyword='auth_mode'";
                                $r = $db->query($q);
                                $row = $r->fetchRow();
                                return $row[0];
                                break;  
                }
        }

Here is the caller graph for this function:

ilAuthUtils::_getAuthModeName ( a_auth_key  ) 

Definition at line 100 of file class.ilAuthUtils.php.

References $ilias.

Referenced by ilObjUserGUI::createObject(), ilObjUserGUI::editObject(), and ilObjAuthSettingsGUI::viewObject().

        {
                global $ilias;

                switch ($a_auth_key)
                {
                        case AUTH_LOCAL:
                                return "local";
                                break;
                                
                        case AUTH_LDAP:
                                return "ldap";
                                break;
                                
                        case AUTH_RADIUS:
                                return "radius";
                                break;
                                
                        case AUTH_SCRIPT:
                                return "script";
                                break;
                                
                        case AUTH_SHIBBOLETH:
                                return "shibboleth";
                                break;
                                
                        default:
                                return "default";
                                break;  
                }
        }

Here is the caller graph for this function:

ilAuthUtils::_getAuthModeOfUser ( a_username,
a_password,
a_db_handler = '' 
)

Definition at line 36 of file class.ilAuthUtils.php.

References $q, $row, and _getAuthMode().

Referenced by ILIAS::ILIAS().

        {
                global $ilDB;
                
                $db =& $ilDB;
                
                if ($a_db_handler != '')
                {
                        $db =& $a_db_handler;
                }
                
                $q = "SELECT auth_mode FROM usr_data WHERE ".
                         "login = ".$ilDB->quote($a_username)." AND ".
                         "passwd = ".$ilDB->quote(md5($a_password))."";
                $r = $this->db->query($q);
                
                $row = $r->fetchRow(DB_FETCHMODE_OBJECT);
                
                return ilAuthUtils::_getAuthMode($row->auth_mode,$db);
        }

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file: