24 include_once
'Auth/Container/LDAP.php';
58 include_once
'Services/LDAP/classes/class.ilLDAPServer.php';
71 parent::__construct($this->server->toPearAuthArray());
76 self::$force_creation = $a_status;
88 $this->optional_check =
true;
111 if(!$this->server->doConnectionCheck())
117 $res = parent::fetchData($username,$password);
121 $this->log->notice(
'Authentication failed with message:' .
$res->getMessage());
124 elseif (
$res ==
true)
126 $this->log->debug(
'Authentication successful');
132 return parent::fetchData($username,$password);
148 $this->log->debug(
'Checking group restrictions...');
151 $groups = $this->server->getGroupNames();
155 $this->log->debug(
'no group restrictions found');
160 $this->log->debug(
'Group membership is otional');
164 foreach($groups as $group)
166 $this->options[
'group'] = $group;
168 if(parent::checkGroup($a_name))
184 $this->options[
'userfilter'] = $this->server->getGroupUserFilter();
196 $user_data = array_change_key_case($a_auth->getAuthData(),CASE_LOWER);
200 include_once
'./Services/LDAP/classes/class.ilLDAPUserSynchronisation.php';
203 $sync->setUserData($user_data);
204 $sync->forceCreation(self::$force_creation);
207 $internal_account = $sync->sync();
210 $this->log->info(
'Login failed with message: ' . $e->getMessage());
211 $a_auth->status = AUTH_WRONG_LOGIN;
217 $this->log->info(
'Login failed with message: ' . $e->getMessage());
223 $this->log->info(
'Starting account migration');
225 ilUtil::redirect(
'ilias.php?baseClass=ilStartUpGUI&cmdClass=ilstartupgui&cmd=showAccountMigration');
228 $a_auth->setAuth($internal_account);
239 include_once(
'Services/LDAP/classes/class.ilLDAPAttributeToUser.php');
260 $a_username = isset($a_user_data[strtolower($this->server->getUserAttribute())]) ?
261 $a_user_data[strtolower($this->server->getUserAttribute())] :
265 if(!is_array($a_username))
269 foreach($a_username as $name)
278 return $a_username[0];
290 #$GLOBALS['ilLog']->write(__METHOD__.': Required 1'); 294 include_once
'./Services/LDAP/classes/class.ilLDAPAttributeMapping.php';
297 #$GLOBALS['ilLog']->write(__METHOD__.': Required 2'); 300 include_once
'./Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php';
303 #$GLOBALS['ilLog']->write(__METHOD__.': Required 3');
static _getFirstActiveServer()
Get first active server.
Description of ilLDAPSyncronisationException.
static hasRulesForUpdate()
Check if there any rule for updates.
checkGroup($a_name)
check group overwritten base class
loginObserver($a_username, $a_auth)
Called from fetchData after successful login.
failedLoginObserver($a_username, $a_auth)
Called from fetchData after failed login.
static hasRulesForUpdate($a_server_id)
Check if there is ldap attribute -> user data mapping which which is updated on login.
updateUserFilter()
Update user filter.
Overwritten Pear class AuthContainerLDAP This class is overwritten to support nested groups...
Synchronization of user accounts used in auth container ldap, radius , cas,...
initLDAPAttributeToUser()
Init LDAP attribute mapping.
setExternalAccount($a_ext)
Set external account (unique for each auth mode)
Description of ilLDAPAccountMigrationRequiredException.
static getInstanceByServerId($a_server_id)
Get instance by server id.
updateRequired($a_username)
Check if an update is required.
enableOptionalGroupCheck()
enable optional group check
extractUserName($a_user_data)
const AUTH_LDAP_NO_ILIAS_USER
static _checkExternalAuthAccount($a_auth, $a_account)
check whether external account and authentication method matches with a user
fetchData($username, $password)
Overwritten from base class.
enabledOptionalGroupCheck()
Check if optional group check is enabled.
__construct($a_server_id=null)
Constructor.
static getLogger($a_component_id)
Get component logger.
Update/create ILIAS user account by given LDAP attributes according to user attribute mapping setting...
supportsCaptchaVerification()
static redirect($a_script)
http redirect to other script
isError($data, $code=null)
Tell whether a value is a PEAR error.