14        include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
 
   15        ilUnitUtil::performInitialisation();
 
   24        include_once(
"./Services/User/classes/class.ilObjUser.php");
 
   37            "login" => 
"aatestuser",
 
   39            "passwd" => 
"password",
 
   42            "lastname" => 
"Mutzke",
 
   43            "email" => 
"de@de.de",
 
   44            "client_ip" => 
"1.2.3.4",
 
   45            "ext_account" => 
"ext_mutzke" 
   50        $user->setLanguage(
"no");
 
   53        $value .= 
$user->getFirstname() . 
"-";
 
   56        $user->setFirstname(
"Maxi");
 
   58        $value .= 
$user->getFirstname() . 
"-";
 
   61        $user->refreshLogin();
 
   68        $value .= 
$n[
"lastname"] . 
"-";
 
   81        $user->writePref(
"testpref", 
"pref1");
 
   83        $user->deletePref(
"testpref");
 
   85            $value .= 
"pref2" . 
"-";
 
   89        $user->setActive(
false);
 
   93        $user->setActive(
true);
 
  106            "Max-Maxi-de@de.de-m-1.2.3.4-Mutzke-aatestuser-ext_mutzke-$id-no-le-" .
 
  107            "pref1-pref2-act1-act2-act3-",
 
  119        include_once(
"./Services/User/classes/class.ilObjUser.php");
 
  126            "login" => 
"aatestuser2",
 
  128            "passwd" => 
"password",
 
  130            "firstname" => 
"Heidi",
 
  131            "lastname" => 
"Kabel",
 
  132            "email" => 
"qwe@ty.de",
 
  133            "ext_account" => 
"ext_" 
  136        $user->setActive(
true);
 
  139        $user->setLanguage(
"de");
 
  147        if (is_array($logins) && count($logins) == 1 && $logins[0] == 
"aatestuser2") {
 
  159        foreach ($acc as $k => $v) {
 
  160            if ($k == 
$id && $v == 
"ext_kabel") {
 
  189            "email1-email2-auth1-auth2-auth3-auth4-",
 
  200        include_once(
"./Services/User/classes/class.ilObjUser.php");
 
  207            "login" => 
"aatestuser3",
 
  209            "passwd" => 
"password",
 
  211            "firstname" => 
"Heidi",
 
  212            "lastname" => 
"Kabel",
 
  213            "email" => 
"de@de.de" 
  216        $user->setActive(
true);
 
  219        $user->setLanguage(
"de");
 
  223        $user->addDesktopItem(ROOT_FOLDER_ID, 
"root");
 
  224        if (
$user->isDesktopItem(ROOT_FOLDER_ID, 
"root")) {
 
  227        $user->setDesktopItemParameters(ROOT_FOLDER_ID, 
"root", 
"par1");
 
  228        $di = 
$user->getDesktopItems();
 
  229        if ($item = current($di)) {
 
  230            if ($item[
"type"] == 
"root" && $item[
"ref_id"] == ROOT_FOLDER_ID) {
 
  235        $user->dropDesktopItem(ROOT_FOLDER_ID, 
"root");
 
  236        if (!
$user->isDesktopItem(ROOT_FOLDER_ID, 
"root")) {
 
  239        $user->_removeItemFromDesktops(ROOT_FOLDER_ID);
 
  245            "desk1-desk2-desk3-",
 
  256        include_once(
"./Services/User/classes/class.ilObjUser.php");
 
  296            "login" => 
"aatestuser3",
 
  298            "passwd" => 
"password",
 
  300            "firstname" => 
"Heidi",
 
  301            "lastname" => 
"Kabel",
 
  302            "email" => 
"de@de.de" 
  305        $user->setActive(
true);
 
  308        $user->setLanguage(
"de");
 
  312        $user->addObjectToClipboard(
$id, 
"user", 
"aatestuser");
 
  313        $user->addObjectToClipboard(56, 
"mump", 
"mumpitz");
 
  314        if (
$user->clipboardHasObjectsOfType(
"user")) {
 
  318        $user->clipboardDeleteObjectsOfType(
"user");
 
  319        if (
$user->clipboardHasObjectsOfType(
"mump") &&
 
  320            !
$user->clipboardHasObjectsOfType(
"user")) {
 
  324        $objs = 
$user->getClipboardObjects(
"mump");
 
  325        if (is_array($objs) && count($objs) == 1 && $objs[0][
"id"] == 56) {
 
  329        $objs = 
$user->getClipboardChilds(56, 
"2008-10-10");
 
  333        if (is_array($us) && count($us) == 1 && $us[0] == 
$id) {
 
  340            "clip1-clip2-clip3-clip4-",
 
  353        include_once(
"./Services/User/classes/class.ilObjUser.php");
 
An exception for terminatinating execution or to throw for unit testing.
Class ilObjUserTest @group needsInstalledILIAS.
testAuthAndEmailMethods()
Auth and email related methods @group IL_Init.
testSearch()
Search methods @group IL_Init.
testPersonalDesktopItems()
Personal Desktop Items @group IL_Init.
testClipboard()
Clipboard @group IL_Init.
testMiscellaneous()
Miscellaneous @group IL_Init.
testCreateSetLookupDelete()
Creates a user, sets preferences, lookups data, delete user @group IL_Init.
static _resetLoginAttempts($a_usr_id)
static _writeExternalAccount($a_usr_id, $a_ext_id)
static _lookupPref($a_usr_id, $a_keyword)
static _lookupEmail($a_user_id)
Lookup email.
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 _getAllUserData($a_fields=null, $active=-1)
STATIC METHOD get all user data.
static _lookupFields($a_user_id)
lookup fields (deprecated; use more specific methods instead)
static _lookupLogin($a_user_id)
lookup login
static _checkExternalAuthAccount($a_auth, $a_account, $tryFallback=true)
check whether external account and authentication method matches with a user
static getUserIdByLogin($a_login)
static _writeAuthMode($a_usr_id, $a_auth_mode)
static _incrementLoginAttempts($a_usr_id)
static _lookupExternalAccount($a_user_id)
lookup external account for login and authmethod
static _lookupId($a_user_str)
Lookup id by login.
static _getAllUserAssignedStyles()
skins and styles
static _lookupGender($a_user_id)
Lookup gender.
static _lookupName($a_user_id)
lookup user name
static _getNumberOfUsersPerAuthMode()
get number of users per auth mode
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 _moveUsersToStyle($a_from_skin, $a_from_style, $a_to_skin, $a_to_style)
skins and styles
static _getUsersForClipboadObject($a_type, $a_id)
get all users, that have a certain object within their clipboard
static _externalAccountExists($a_external_account, $a_auth_mode)
Check if an external account name already exists.
static _setUserInactive($a_usr_id)
static _lookupAuthMode($a_usr_id)
lookup auth mode
getStoredActive($a_id)
get user active state
static _lookupLastLogin($a_user_id)
lookup last login
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 _getLocalAccountsForEmail($a_email)
check whether external account and authentication method matches with a user
static _lookupLanguage($a_usr_id)
static getUserLoginsByEmail($a_email)
get all user login names of an email address
static _lookupClientIP($a_user_id)
Lookup client ip.
static _getNumberOfUsersForStyle($a_skin, $a_style)
skins and styles
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...
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
if(!array_key_exists('StateId', $_REQUEST)) $id