14 protected function setUp() : void
16 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
17 ilUnitUtil::performInitialisation();
26 include_once(
"./Services/User/classes/class.ilObjUser.php");
39 "login" =>
"aatestuser",
41 "passwd" =>
"password",
44 "lastname" =>
"Mutzke",
45 "email" =>
"de@de.de",
46 "client_ip" =>
"1.2.3.4",
47 "ext_account" =>
"ext_mutzke" 49 $user->assignData(
$d);
52 $user->setLanguage(
"no");
55 $value .= $user->getFirstname() .
"-";
58 $user->setFirstname(
"Maxi");
60 $value .= $user->getFirstname() .
"-";
63 $user->refreshLogin();
70 $value .=
$n[
"lastname"] .
"-";
83 $user->writePref(
"testpref",
"pref1");
85 $user->deletePref(
"testpref");
87 $value .=
"pref2" .
"-";
91 $user->setActive(
false);
95 $user->setActive(
true);
108 "Max-Maxi-de@de.de-m-1.2.3.4-Mutzke-aatestuser-ext_mutzke-$id-no-le-" .
109 "pref1-pref2-act1-act2-act3-",
121 include_once(
"./Services/User/classes/class.ilObjUser.php");
128 "login" =>
"aatestuser2",
130 "passwd" =>
"password",
132 "firstname" =>
"Heidi",
133 "lastname" =>
"Kabel",
134 "email" =>
"qwe@ty.de",
135 "ext_account" =>
"ext_" 137 $user->assignData(
$d);
138 $user->setActive(
true);
141 $user->setLanguage(
"de");
143 $id = $user->getId();
149 if (is_array($logins) && count($logins) == 1 && $logins[0] ==
"aatestuser2") {
161 foreach ($acc as $k => $v) {
162 if ($k == $id && $v ==
"ext_kabel") {
191 "email1-email2-auth1-auth2-auth3-auth4-",
203 include_once(
"./Services/User/classes/class.ilObjUser.php");
243 "login" =>
"aatestuser3",
245 "passwd" =>
"password",
247 "firstname" =>
"Heidi",
248 "lastname" =>
"Kabel",
249 "email" =>
"de@de.de" 251 $user->assignData(
$d);
252 $user->setActive(
true);
255 $user->setLanguage(
"de");
257 $id = $user->getId();
259 $user->addObjectToClipboard($id,
"user",
"aatestuser");
260 $user->addObjectToClipboard(56,
"mump",
"mumpitz");
261 if ($user->clipboardHasObjectsOfType(
"user")) {
265 $user->clipboardDeleteObjectsOfType(
"user");
266 if ($user->clipboardHasObjectsOfType(
"mump") &&
267 !$user->clipboardHasObjectsOfType(
"user")) {
271 $objs = $user->getClipboardObjects(
"mump");
272 if (is_array($objs) && count($objs) == 1 && $objs[0][
"id"] == 56) {
276 $objs = $user->getClipboardChilds(56,
"2008-10-10");
280 if (is_array($us) && count($us) == 1 && $us[0] == $id) {
287 "clip1-clip2-clip3-clip4-",
300 include_once(
"./Services/User/classes/class.ilObjUser.php");
static _lookupLogin($a_user_id)
lookup login
static _lookupName($a_user_id)
lookup user name
static getUserIdByLogin($a_login)
static _lookupExternalAccount($a_user_id)
lookup external account for login and authmethod
static _getNumberOfUsersForStyle($a_skin, $a_style)
skins and styles
Class ilObjUserTest needsInstalledILIAS.
testAuthAndEmailMethods()
Auth and email related methods IL_Init.
testClipboard()
Clipboard IL_Init.
static _getUsersForClipboadObject($a_type, $a_id)
get all users, that have a certain object within their clipboard
testSearch()
Search methods IL_Init.
static _incrementLoginAttempts($a_usr_id)
static _getExternalAccountsByAuthMode($a_auth_mode, $a_read_auth_default=false)
Get list of external account by authentication method Note: If login == ext_account for two user with...
static _lookupId($a_user_str)
Lookup id by login.
static _lookupClientIP($a_user_id)
Lookup client ip.
static _lookupGender($a_user_id)
Lookup gender.
static _resetLoginAttempts($a_usr_id)
static _getLoginAttempts($a_usr_id)
static _toggleActiveStatusOfUsers($a_usr_ids, $a_status)
Toggle active status of users.
static _readUsersProfileData($a_user_ids)
STATIC METHOD get user data of selected users.
static _externalAccountExists($a_external_account, $a_auth_mode)
Check if an external account name already exists.
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 _getAllUserData($a_fields=null, $active=-1)
STATIC METHOD get all user data.
static getUserLoginsByEmail($a_email)
get all user login names of an email address
static _getLocalAccountsForEmail($a_email)
check whether external account and authentication method matches with a user
static _getNumberOfUsersPerAuthMode()
get number of users per auth mode
static searchUsers($a_search_str, $active=1, $a_return_ids_only=false, $filter_settings=false)
STATIC METHOD get the user_ids which correspond a search string.
static _checkExternalAuthAccount($a_auth, $a_account, $tryFallback=true)
check whether external account and authentication method matches with a user
testMiscellaneous()
Miscellaneous IL_Init.
static _lookupAuthMode($a_usr_id)
lookup auth mode
static _setUserInactive($a_usr_id)
static _lookupLanguage($a_usr_id)
static _lookupEmail($a_user_id)
Lookup email.
static _lookupPref($a_usr_id, $a_keyword)
testCreateSetLookupDelete()
Creates a user, sets preferences, lookups data, delete user IL_Init.
static _moveUsersToStyle($a_from_skin, $a_from_style, $a_to_skin, $a_to_style)
skins and styles
getStoredActive($a_id)
get user active state
static _lookupFields($a_user_id)
lookup fields (deprecated; use more specific methods instead)
static _writeAuthMode($a_usr_id, $a_auth_mode)
static _writeExternalAccount($a_usr_id, $a_ext_id)
static _getAllUserAssignedStyles()
skins and styles
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
static _lookupLastLogin($a_user_id)
lookup last login