55 return $this->storage;
68 $this->enableLogging =
false;
70 if ($this->enableLogging)
72 $GLOBALS[
'ilLog']->write(__METHOD__.
': Init callbacks');
74 $this->setLoginCallback(array($this,
'loginObserver'));
75 $this->setFailedLoginCallback(array($this,
'failedLoginObserver'));
76 $this->setCheckAuthCallback(array($this,
'checkAuthObserver'));
77 $this->setLogoutCallback(array($this,
'logoutObserver'));
79 include_once(
'Services/Authentication/classes/class.ilAuthLogObserver.php');
94 global
$ilLog, $ilAppEventHandler;
98 $ilAppEventHandler->raise(
"Services/Authentication",
"afterLogin",
99 array(
"username" => $a_auth->getUsername()));
102 include_once
"Services/User/classes/class.ilObjUser.php";
104 if($user_id != ANONYMOUS_USER_ID)
107 include_once
"Services/User/classes/class.ilUserProfile.php";
110 $user->setProfileIncomplete(
true);
115 $ilLog->write(__METHOD__.
': logged in as '.$a_auth->getUsername().
116 ', remote:'.$_SERVER[
'REMOTE_ADDR'].
':'.$_SERVER[
'REMOTE_PORT'].
117 ', server:'.$_SERVER[
'SERVER_ADDR'].
':'.$_SERVER[
'SERVER_PORT']
134 $ilLog->write(__METHOD__.
': login failed for user '.$a_username.
135 ', remote:'.$_SERVER[
'REMOTE_ADDR'].
':'.$_SERVER[
'REMOTE_PORT'].
136 ', server:'.$_SERVER[
'SERVER_ADDR'].
':'.$_SERVER[
'SERVER_PORT']
139 require_once
'Services/PrivacySecurity/classes/class.ilSecuritySettings.php';
146 if(!in_array(
$usr_id, array(ANONYMOUS_USER_ID, SYSTEM_USER_ID)))
151 $max_attempts = $security->getLoginMaxAttempts();
152 if((
int)$max_attempts && $login_attempts >= $max_attempts)
159 return $this->
getContainer()->failedLoginObserver($a_username,$a_auth);
170 #$GLOBALS['ilLog']->write(__METHOD__.': Check auth observer called');
171 return $this->
getContainer()->checkAuthObserver($a_username,$a_auth);
184 $GLOBALS[
'ilLog']->write(__METHOD__.
': Logout observer called');
185 $this->
getContainer()->logoutObserver($a_username,$a_auth);