ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Synchronization of user accounts used in auth container ldap, radius , cas,... More...
Public Member Functions | |
__construct ($a_authmode, $a_server_id) | |
Constructor. More... | |
getServer () | |
Get current ldap server. More... | |
getAuthMode () | |
Get Auth Mode. More... | |
setExternalAccount ($a_ext) | |
Set external account (unique for each auth mode) More... | |
getExternalAccount () | |
Get external accocunt. More... | |
getInternalAccount () | |
Get ILIAS unique internal account name. More... | |
forceCreation ($a_force) | |
Force cration of user accounts (Account migration enabled) More... | |
forceReadLdapData ($a_status) | |
isCreationForced () | |
Check if creation of user account is forced (account migration) More... | |
getUserData () | |
Get user data. More... | |
setUserData ($a_data) | |
Set user data. More... | |
sync () | |
Synchronize user account. More... | |
Protected Member Functions | |
handleCreation () | |
Handle creation of user accounts. More... | |
performUpdate () | |
Update user account and role assignments. More... | |
readUserData () | |
Read user data. More... | |
readInternalAccount () | |
Read internal account of user. More... | |
isUpdateRequired () | |
Check if an update is required. More... | |
initServer ($a_auth_mode, $a_server_id) | |
Init LDAP server. More... | |
Private Attributes | |
$authmode = 0 | |
$server = null | |
$extaccount = '' | |
$intaccount = '' | |
$user_data = array() | |
$force_creation = false | |
$force_read_ldap_data = false | |
Synchronization of user accounts used in auth container ldap, radius , cas,...
Definition at line 14 of file class.ilLDAPUserSynchronisation.php.
ilLDAPUserSynchronisation::__construct | ( | $a_authmode, | |
$a_server_id | |||
) |
Constructor.
string | $a_auth_mode |
Definition at line 34 of file class.ilLDAPUserSynchronisation.php.
References initServer().
ilLDAPUserSynchronisation::forceCreation | ( | $a_force | ) |
Force cration of user accounts (Account migration enabled)
bool | $a_force |
Definition at line 88 of file class.ilLDAPUserSynchronisation.php.
ilLDAPUserSynchronisation::forceReadLdapData | ( | $a_status | ) |
Definition at line 93 of file class.ilLDAPUserSynchronisation.php.
ilLDAPUserSynchronisation::getAuthMode | ( | ) |
Get Auth Mode.
Definition at line 52 of file class.ilLDAPUserSynchronisation.php.
References $authmode.
Referenced by performUpdate(), readInternalAccount(), and readUserData().
ilLDAPUserSynchronisation::getExternalAccount | ( | ) |
Get external accocunt.
Definition at line 70 of file class.ilLDAPUserSynchronisation.php.
References $extaccount.
Referenced by performUpdate(), readInternalAccount(), and readUserData().
ilLDAPUserSynchronisation::getInternalAccount | ( | ) |
Get ILIAS unique internal account name.
Definition at line 79 of file class.ilLDAPUserSynchronisation.php.
References $intaccount.
Referenced by isUpdateRequired(), readUserData(), and sync().
ilLDAPUserSynchronisation::getServer | ( | ) |
Get current ldap server.
Definition at line 43 of file class.ilLDAPUserSynchronisation.php.
References $server.
Referenced by handleCreation(), isUpdateRequired(), performUpdate(), readUserData(), and sync().
ilLDAPUserSynchronisation::getUserData | ( | ) |
Get user data.
Definition at line 111 of file class.ilLDAPUserSynchronisation.php.
References $user_data.
Referenced by performUpdate().
|
protected |
Handle creation of user accounts.
Definition at line 159 of file class.ilLDAPUserSynchronisation.php.
References getServer(), isCreationForced(), and readUserData().
Referenced by sync().
|
protected |
Init LDAP server.
int | $a_server_id |
Definition at line 272 of file class.ilLDAPUserSynchronisation.php.
References ilLDAPServer\getInstanceByServerId().
Referenced by __construct().
ilLDAPUserSynchronisation::isCreationForced | ( | ) |
Check if creation of user account is forced (account migration)
Definition at line 102 of file class.ilLDAPUserSynchronisation.php.
References $force_creation.
Referenced by handleCreation(), isUpdateRequired(), and performUpdate().
|
protected |
Check if an update is required.
Definition at line 244 of file class.ilLDAPUserSynchronisation.php.
References getInternalAccount(), getServer(), ilLDAPRoleAssignmentRule\hasRulesForUpdate(), ilLDAPAttributeMapping\hasRulesForUpdate(), and isCreationForced().
Referenced by sync().
|
protected |
Update user account and role assignments.
Definition at line 176 of file class.ilLDAPUserSynchronisation.php.
References ilUserCreationContext\CONTEXT_LDAP, getAuthMode(), getExternalAccount(), ilUserCreationContext\getInstance(), getServer(), getUserData(), isCreationForced(), ilLDAPAttributeToUser\MODE_INITIALIZE_ROLES, and readInternalAccount().
Referenced by sync().
|
protected |
Read internal account of user.
UnexpectedValueException |
Definition at line 229 of file class.ilLDAPUserSynchronisation.php.
References ilObjUser\_checkExternalAuthAccount(), getAuthMode(), and getExternalAccount().
Referenced by performUpdate(), and sync().
|
protected |
Read user data.
In case of auth mode != 'ldap' start a query with external account name against ldap server
Definition at line 204 of file class.ilLDAPUserSynchronisation.php.
References $query, $user, ilLogLevel\DEBUG, getAuthMode(), getExternalAccount(), getInternalAccount(), ilLoggerFactory\getLogger(), and getServer().
Referenced by handleCreation(), and sync().
ilLDAPUserSynchronisation::setExternalAccount | ( | $a_ext | ) |
Set external account (unique for each auth mode)
string | $a_ext |
Definition at line 61 of file class.ilLDAPUserSynchronisation.php.
ilLDAPUserSynchronisation::setUserData | ( | $a_data | ) |
Set user data.
array | $a_data |
Definition at line 120 of file class.ilLDAPUserSynchronisation.php.
ilLDAPUserSynchronisation::sync | ( | ) |
Synchronize user account.
UnexpectedValueException | missing or wrong external account given |
ilLDAPSynchronisationForbiddenException | if user synchronisation is disabled |
Definition at line 131 of file class.ilLDAPUserSynchronisation.php.
References getInternalAccount(), ilLoggerFactory\getLogger(), getServer(), handleCreation(), isUpdateRequired(), performUpdate(), readInternalAccount(), and readUserData().
|
private |
Definition at line 16 of file class.ilLDAPUserSynchronisation.php.
Referenced by getAuthMode().
|
private |
Definition at line 20 of file class.ilLDAPUserSynchronisation.php.
Referenced by getExternalAccount().
|
private |
Definition at line 25 of file class.ilLDAPUserSynchronisation.php.
Referenced by isCreationForced().
|
private |
Definition at line 26 of file class.ilLDAPUserSynchronisation.php.
|
private |
Definition at line 21 of file class.ilLDAPUserSynchronisation.php.
Referenced by getInternalAccount().
|
private |
Definition at line 18 of file class.ilLDAPUserSynchronisation.php.
Referenced by getServer().
|
private |
Definition at line 23 of file class.ilLDAPUserSynchronisation.php.
Referenced by getUserData().