57        $this->sub_status = $a_sub_status;
 
   76        return $this->storage;
 
   88        $this->enableLogging = 
true;
 
   91        if ($this->enableLogging) {
 
   94        $this->setLoginCallback(array($this,
'loginObserver'));
 
   95        $this->setFailedLoginCallback(array($this,
'failedLoginObserver'));
 
   96        $this->setCheckAuthCallback(array($this,
'checkAuthObserver'));
 
   97        $this->setLogoutCallback(array($this,
'logoutObserver'));
 
   99        include_once(
'Services/Authentication/classes/class.ilAuthLogObserver.php');
 
  114        $ilAppEventHandler = 
$DIC[
'ilAppEventHandler'];
 
  119            include_once 
"Services/User/classes/class.ilObjUser.php";
 
  121            if ($user_id != ANONYMOUS_USER_ID) {
 
  125                include_once 
"Services/User/classes/class.ilUserProfile.php";
 
  127                    $user->setProfileIncomplete(
true);
 
  137                if (!
$user->getActive()) {
 
  144                if (!
$user->checkTimeLimit()) {
 
  147                    $this->exceeded_user_name = $this->getUserName();
 
  153                $clientip = 
$user->getClientIP();
 
  154                if (trim($clientip) != 
"") {
 
  155                    $clientip = preg_replace(
"/[^0-9.?*,:]+/", 
"", $clientip);
 
  156                    $clientip = str_replace(
".", 
"\\.", $clientip);
 
  157                    $clientip = str_replace(array(
"?",
"*",
","), array(
"[0-9]",
"[0-9]*",
"|"), $clientip);
 
  158                    if (!preg_match(
"/^" . $clientip . 
"$/", 
$_SERVER[
"REMOTE_ADDR"])) {
 
  166                if (
$ilSetting->get(
'ps_prevent_simultaneous_logins') &&
 
  173                include_once 
'Services/Tracking/classes/class.ilOnlineTracking.php';
 
  174                ilOnlineTracking::addUser($user_id);
 
  176                include_once 
'Modules/Forum/classes/class.ilObjForum.php';
 
  179                require_once 
'Services/PrivacySecurity/classes/class.ilSecuritySettings.php';
 
  185                if ($security_settings->isPasswordChangeOnFirstLoginEnabled() &&
 
  186                    $user->getLastLogin() == 
null 
  188                    $user->resetLastPasswordChange();
 
  191                $user->refreshLogin();
 
  199                'logged in as ' . $a_auth->getUsername() .
 
  206            $ilAppEventHandler->raise(
 
  207                'Services/Authentication',
 
  209                array(
'username' => $a_auth->getUsername())
 
  227            ': login failed for user ' . $a_username .
 
  234            if (!in_array($usr_id, array(ANONYMOUS_USER_ID))) {
 
  238                require_once 
'Services/PrivacySecurity/classes/class.ilSecuritySettings.php';
 
  240                $max_attempts = $security->getLoginMaxAttempts();
 
  242                if ((
int) $max_attempts && $login_attempts >= $max_attempts) {
 
  248        return $this->
getContainer()->failedLoginObserver($a_username, $a_auth);
 
  259        return $this->
getContainer()->checkAuthObserver($a_username, $a_auth);
 
  273        $ilAppEventHandler = 
$DIC[
'ilAppEventHandler'];
 
  279        $ilAppEventHandler->raise(
 
  280            'Services/Authentication',
 
  282            array(
'username' => $a_auth->getUsername())
 
  285        return $this->
getContainer()->logoutObserver($a_username, $a_auth);
 
An exception for terminatinating execution or to throw for unit testing.
const AUTH_USER_SIMULTANEOUS_LOGIN
const AUTH_USER_TIME_LIMIT_EXCEEDED
@classDescription Base class for all PEAR and ILIAS auth classes.
initAuth()
Init auth object Enable logging, set callbacks...
getContainer()
Get container object.
setSubStatus($a_sub_status)
Set sub status.
failedLoginObserver($a_username, $a_auth)
Called after failed login.
getSubStatus()
Get sub status.
loginObserver($a_username, $a_auth)
Called after successful login.
supportsRedirects()
Returns true, if the current auth mode allows redirects to e.g the login screen, public section ....
logoutObserver($a_username, $a_auth)
Called after logout.
checkAuthObserver($a_username, $a_auth)
Called after each check auth request.
static getLogger($a_component_id)
Get component logger.
static _updateOldAccess($a_usr_id)
static _resetLoginAttempts($a_usr_id)
static _incrementLoginAttempts($a_usr_id)
static _lookupId($a_user_str)
Lookup id by login.
static _setUserInactive($a_usr_id)
static _getLoginAttempts($a_usr_id)
static _loginExists($a_login, $a_user_id=0)
check if a login name already exists You may exclude a user from the check by giving his user id as 2...
static hasActiveSession($a_user_id, $a_session_id)
Check for simultaneous login.
static _getInstance()
Get instance of ilSecuritySettings.
static handleLogoutEvent()
reset sessions type to unknown
static initSession()
mark session with type regarding to the context.
static handleLoginEvent($a_login, ilAuthSession $auth_session)
when current session is allowed to be created it marks it with type regarding to the sessions user co...
static isProfileIncomplete($a_user, $a_include_udf=true, $a_personal_data_only=true)
Check if all required personal data fields are set.
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']