ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilObjUser Class Reference

User class. More...

+ Inheritance diagram for ilObjUser:
+ Collaboration diagram for ilObjUser:

Public Member Functions

 __construct (int $a_user_id=0, bool $a_call_by_reference=false)
 
 read ()
 
 saveAsNew ()
 
 update ()
 
 resetPassword (string $new_raw_password)
 
 getLastHistoryData ()
 
 updateLogin (string $login)
 
 writePref (string $keyword, string $value)
 
 deletePref (string $keyword)
 
 writePrefs ()
 
 getTimeZone ()
 
 getTimeFormat ()
 
 getDateFormat ()
 
 getDateTimeFormat ()
 
 setPref (string $a_keyword, ?string $a_value)
 
 getPref (string $a_keyword)
 
 getPrefs ()
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! More...
 
 withProfileData (Data $profile_data)
 
 getProfileData ()
 
 setLogin (string $login)
 
 getLogin ()
 
 setGender (string $gender_string)
 
 getGender ()
 
 setUTitle (string $user_title)
 This sets the USER's title NOT the OBJECT's title! More...
 
 getUTitle ()
 
 setFirstname (string $firstname)
 
 getFirstname ()
 
 setLastname (string $lastname)
 
 getLastname ()
 
 setBirthday (?string $birthday)
 
 getBirthday ()
 
 setInstitution (string $instituion)
 
 getInstitution ()
 
 setDepartment (string $department)
 
 getDepartment ()
 
 setStreet (string $street)
 
 getStreet ()
 
 setCity (string $city)
 
 getCity ()
 
 setZipcode (string $zipcode)
 
 getZipcode ()
 
 setCountry (string $country)
 
 getCountry ()
 
 setPhoneOffice (string $phone)
 
 getPhoneOffice ()
 
 setPhoneHome (string $phone)
 
 getPhoneHome ()
 
 setPhoneMobile (string $phone)
 
 getPhoneMobile ()
 
 setFax (string $fax)
 
 getFax ()
 
 setMatriculation (string $matriculation)
 
 getMatriculation ()
 
 setEmail (string $email)
 
 getEmail ()
 
 setSecondEmail (?string $email)
 
 getSecondEmail ()
 
 setHobby (string $hobby)
 
 getHobby ()
 
 setComment (string $referral_comment)
 
 getComment ()
 
 setLatitude (?string $latitude)
 
 getLatitude ()
 
 setLongitude (?string $longitude)
 
 getLongitude ()
 
 setLocationZoom (?int $zoom)
 
 getLocationZoom ()
 
 getAvatarRid ()
 
 setAvatarRid (?ResourceIdentification $avatar_rid)
 
 setClientIP (string $a_str)
 
 getClientIP ()
 
 setLanguage (string $language)
 
 getLanguage ()
 
 getPasswordEncodingType ()
 
 setPasswordEncodingType (?string $password_encryption_type)
 
 getPasswordSalt ()
 
 setPasswordSalt (?string $password_salt)
 
 setFullname ()
 
 getFullname (int $max_strlen=0)
 
 setPasswd (string $a_str, string $a_type=ilObjUser::PASSWD_PLAIN)
 
 getPasswd ()
 
 getPasswdType ()
 
 setLastPasswordChangeTS (int $a_last_password_change_ts)
 
 getLastPasswordChangeTS ()
 
 getPasswordPolicyResetStatus ()
 
 setPasswordPolicyResetStatus (bool $status)
 
 getCurrentLanguage ()
 returns the current language (may differ from user's pref setting!) More...
 
 setCurrentLanguage (string $language)
 Set current language. More...
 
 setLastLogin (string $a_str)
 
 getLastLogin ()
 
 refreshLogin ()
 
 setFirstLogin (string $date)
 
 getFirstLogin ()
 
 setLastProfilePrompt (string $date)
 
 getLastProfilePrompt ()
 
 setLastUpdate (string $date)
 
 getLastUpdate ()
 
 setApproveDate (?string $a_str)
 set date the user account was activated null indicates that the user has not yet been activated More...
 
 getApproveDate ()
 
 getAgreeDate ()
 
 setAgreeDate (?string $date)
 
 setActive (bool $active, int $owner=0)
 set user active state and updates system fields appropriately More...
 
 getActive ()
 
 getSkin ()
 
 setTimeLimitOwner (int $a_owner)
 
 getTimeLimitOwner ()
 
 setTimeLimitFrom (?int $a_from)
 
 getTimeLimitFrom ()
 
 setTimeLimitUntil (?int $a_until)
 
 getTimeLimitUntil ()
 
 setTimeLimitUnlimited (bool $unlimited)
 
 getTimeLimitUnlimited ()
 
 setLoginAttempts (int $a_login_attempts)
 
 getLoginAttempts ()
 
 checkTimeLimit ()
 
 setProfileIncomplete (bool $a_prof_inc)
 
 getProfileIncomplete ()
 
 isPasswordChangeDemanded ()
 
 isPasswordExpired ()
 
 getPasswordAge ()
 
 setLastPasswordChangeToNow ()
 
 resetLastPasswordChange ()
 
 setAuthMode (?string $a_str)
 
 getAuthMode (bool $a_auth_key=false)
 
 setExternalAccount (string $a_str)
 
 getExternalAccount ()
 
 addObjectToClipboard (int $a_item_id, string $a_type, string $a_title, int $a_parent=0, string $a_time='', int $a_order_nr=0)
 add an item to user's personal clipboard More...
 
 addToPCClipboard (string $a_content, string $a_time, int $a_nr)
 Add a page content item to PC clipboard (should go to another class) More...
 
 getPCClipboardContent ()
 Add a page content item to PC clipboard (should go to another class) More...
 
 clipboardHasObjectsOfType (string $a_type)
 Check whether clipboard has objects of a certain type. More...
 
 clipboardDeleteObjectsOfType (string $a_type)
 
 clipboardDeleteAll ()
 
 getClipboardObjects (string $a_type='', bool $a_top_nodes_only=false)
 get all clipboard objects of user and specified type More...
 
 getClipboardChilds (int $a_parent, string $a_insert_time)
 Get children of an item. More...
 
 removeObjectFromClipboard (int $a_item_id, string $a_type)
 
 getOrgUnitsRepresentation ()
 
 getPersonalPicturePath (string $a_size='small', bool $a_force_pic=false)
 
 hasProfilePicture ()
 
 getAvatar ()
 
 removeUserPicture ()
 
 getProfileAsString (Language $language)
 Get formatted mail body text of user profile data. More...
 
 setFeedPass (string $a_password)
 
 hasPublicProfile ()
 
 getPublicName ()
 
 resetOwner ()
 
 getPersonalDataExportFile ()
 
 sendPersonalDataFile ()
 
 importPersonalData (array $a_file, bool $a_profile_data, bool $a_settings, bool $a_notes, bool $a_calendar)
 
 setInactivationDate (?string $inactivation_date)
 
 getInactivationDate ()
 
 isAnonymous ()
 
 activateDeletionFlag ()
 
 removeDeletionFlag ()
 
 hasDeletionFlag ()
 
 setIsSelfRegistered (bool $status)
 
 isSelfRegistered ()
 
 setGeneralInterests (?array $value=null)
 
 getGeneralInterests ()
 
 getGeneralInterestsAsText ()
 Get general interests as plain text. More...
 
 setOfferingHelp (?array $value=null)
 
 getOfferingHelp ()
 
 getOfferingHelpAsText ()
 Get help offering as plain text. More...
 
 setLookingForHelp (?array $value=null)
 
 getLookingForHelp ()
 
 getLookingForHelpAsText ()
 
 uploadPersonalPicture (string $tmp_file)
 
 generateRegistrationHash ()
 
- Public Member Functions inherited from ilObject
 getObjectProperties ()
 
 flushObjectProperties ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 processAutoRating ()
 
 read ()
 
 getId ()
 
 setId (int $id)
 
 setRefId (int $ref_id)
 
 getRefId ()
 
 getType ()
 
 setType (string $type)
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 
 getUntranslatedTitle ()
 Get untranslated object title WebDAV needs to access the untranslated title of an object. More...
 
 setTitle (string $title)
 
 getDescription ()
 
 setDescription (string $description)
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 
 setImportId (string $import_id)
 
 setOfflineStatus (bool $status)
 
 getOfflineStatus ()
 
 supportsOfflineHandling ()
 
 getOwner ()
 
 getOwnerName ()
 get full name of object owner More...
 
 setOwner (int $usr_id)
 
 getCreateDate ()
 Get create date in YYYY-MM-DD HH-MM-SS format. More...
 
 getLastUpdateDate ()
 Get last update date in YYYY-MM-DD HH-MM-SS format. More...
 
 create ()
 note: title, description and type should be set when this function is called More...
 
 update ()
 
 MDUpdateListener (string $element)
 Metadata update listener. More...
 
 createMetaData ()
 
 updateMetaData ()
 
 deleteMetaData ()
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree (int $parent_ref_id)
 maybe this method should be in tree object!? More...
 
 setPermissions (int $parent_ref_id)
 
 setParentRolePermissions (int $parent_ref_id)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type. More...
 
 applyDidacticTemplate (int $tpl_id)
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo (int $target_id, int $copy_id, int $new_obj_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies (int $target_id, int $copy_id)
 Clone object dependencies. More...
 
 cloneMetaData (ilObject $target_obj)
 Copy meta data. More...
 
 selfOrParentWithRatingEnabled ()
 
 getPossibleSubObjects (bool $filter=true)
 get all possible sub objects of this type the object can decide which types of sub objects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static _isAnonymous (int $usr_id)
 
static _loginExists (string $a_login, int $a_user_id=0)
 
static _externalAccountExists (string $a_external_account, string $a_auth_mode)
 
static _getUsersForRole (int $role_id, int $active=-1)
 
static _getUsersForFolder (int $ref_id, int $active)
 
static _getUsersForGroup (array $a_mem_ids, int $active=-1)
 
static _getUsersForIds (array $a_mem_ids, int $active=-1, int $timelimitowner=-1)
 
static _getUserData (array $a_internalids)
 
static _getPreferences (int $user_id)
 
static getUserSubsetByPreferenceValue (array $a_user_ids, string $a_keyword, string $a_val)
 
static _getLoginAttempts (int $a_usr_id)
 
static _incrementLoginAttempts (int $a_usr_id)
 
static _setUserInactive (int $a_usr_id)
 
static _getUsersOnline (int $a_user_id=0, bool $a_no_anonymous=false)
 
static _verifyRegistrationHash (string $a_hash)
 
static getUserIdsByInactivityPeriod (int $periodInDays)
 
static getUserIdsNeverLoggedIn (int $thresholdInDays)
 
static _getUserIdsByInactivationPeriod (int $period)
 
static getFirstLettersOfLastnames (?array $user_ids=null)
 
static userExists (array $a_usr_ids=[])
 
static _doesLoginnameExistInHistory (string $a_login)
 
static _lookupPref (int $a_usr_id, string $a_keyword)
 
static lookupMatriculation (int $a_usr_id)
 
static findInterests (string $a_term, ?int $a_user_id=null, ?string $a_field_id=null)
 
static getProfileStatusOfUsers (array $a_user_ids)
 
static _lookupFullname (int $a_user_id)
 
static _lookupEmail (int $a_user_id)
 
static _lookupGender (int $a_user_id)
 
static _lookupClientIP (int $a_user_id)
 
static _lookupName (int $a_user_id)
 
static _lookupLanguage (int $a_usr_id)
 
static _writeExternalAccount (int $a_usr_id, string $a_ext_id)
 
static _writeAuthMode (int $a_usr_id, string $a_auth_mode)
 
static _lookupFields (int $a_user_id)
 
static _lookupActive (int $a_usr_id)
 
static _lookupLogin (int $a_user_id)
 
static _lookupExternalAccount (int $a_user_id)
 
static _getExternalAccountsByAuthMode (string $a_auth_mode, bool $a_read_auth_default=false)
 Get list of external account by authentication method Note: If login == ext_account for two user with auth_mode 'default' and auth_mode 'ldap' The ldap auth mode chosen. More...
 
static _toggleActiveStatusOfUsers (array $a_usr_ids, bool $a_status)
 
static _lookupAuthMode (int $a_usr_id)
 
static _checkExternalAuthAccount (string $a_auth, string $a_account, bool $tryFallback=true)
 check whether external account and authentication method matches with a user More...
 
static getUserIdByLogin (string $a_login)
 
static getUserIdsByEmail (string $a_email)
 
static getUserLoginsByEmail (string $a_email)
 
static _lookupId (string|array $a_user_str)
 
static _lookupLastLogin (int $a_user_id)
 
static _lookupFirstLogin (int $a_user_id)
 
static hasActiveSession (int $a_user_id, string $a_session_id)
 
static _readUsersProfileData (array $a_user_ids)
 
static _getNumberOfUsersForStyle (string $a_skin, string $a_style)
 
static _getAllUserAssignedStyles ()
 
static _getNumberOfUsersPerAuthMode ()
 get number of users per auth mode More...
 
static _getLocalAccountsForEmail (string $a_email)
 
static _moveUsersToStyle (string $a_from_skin, string $a_from_style, string $a_to_skin, string $a_to_style)
 
static _getUsersForClipboadObject (string $a_type, int $a_id)
 
static _getImportedUserId (string $i2_id)
 
static lookupOrgUnitsRepresentation (int $a_usr_id)
 
static _getAvatar (int $a_usr_id)
 
static _getPersonalPicturePath (int $a_usr_id, string $a_size='small', bool $a_force_pic=false)
 
static copyProfilePicturesToDirectory (int $a_user_id, string $a_dir)
 
static _lookupFeedHash (int $a_user_id, bool $a_create=false)
 
static _getFeedPass (int $a_user_id)
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId (string $import_id)
 Get (latest) object id for an import id. More...
 
static _lookupImportId (int $obj_id)
 
static _lookupOwnerName (int $owner_id)
 Lookup owner name for owner id. More...
 
static _getIdForImportId (string $import_id)
 
static _getAllReferences (int $id)
 get all reference ids for object ID More...
 
static _lookupTitle (int $obj_id)
 
static lookupOfflineStatus (int $obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner (int $obj_id)
 Lookup owner user ID for object ID. More...
 
static _getIdsForTitle (string $title, string $type='', bool $partial_match=false)
 
static _lookupDescription (int $obj_id)
 
static _lookupLastUpdate (int $obj_id, bool $formatted=false)
 
static _getLastUpdateOfObjects (array $obj_ids)
 
static _lookupObjId (int $ref_id)
 
static _setDeletedDate (int $ref_id, int $deleted_by)
 
static setDeletedDates (array $ref_ids, int $user_id)
 
static _resetDeletedDate (int $ref_id)
 
static _lookupDeletedDate (int $ref_id)
 
static _writeTitle (int $obj_id, string $title)
 write title to db (static) More...
 
static _writeDescription (int $obj_id, string $desc)
 write description to db (static) More...
 
static _writeImportId (int $obj_id, string $import_id)
 write import id to db (static) More...
 
static _lookupType (int $id, bool $reference=false)
 
static _isInTrash (int $ref_id)
 
static _hasUntrashedReference (int $obj_id)
 checks whether an object has at least one reference that is not in trash More...
 
static _lookupObjectId (int $ref_id)
 
static _getObjectsDataForType (string $type, bool $omit_trash=false)
 get all objects of a certain type More...
 
static _exists (int $id, bool $reference=false, ?string $type=null)
 checks if an object exists in object_data More...
 
static _getObjectsByType (string $obj_type="", ?int $owner=null)
 
static _prepareCloneSelection (array $ref_ids, string $new_type, bool $show_path=true)
 Prepare copy wizard object selection. More...
 
static getIconForType (string $type)
 
static _getIcon (int $obj_id=0, string $size="big", string $type="", bool $offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (array &$deps, int $ref_id, int $obj_id, string $type, int $depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies (int $obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $obj_ids)
 
static getAllOwnedRepositoryObjects (int $user_id)
 
static fixMissingTitles ($type, array &$obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate (int $obj_id)
 
static _getObjectTypeIdByTitle (string $type, ?\ilDBInterface $ilDB=null)
 

Data Fields

const PASSWD_PLAIN = 'plain'
 
const PASSWD_CRYPTED = 'crypted'
 
const DATABASE_DATE_FORMAT = 'Y-m-d H:i:s'
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 
const DESC_LENGTH = 128
 
const LONG_DESC_LENGTH = 4000
 
const TABLE_OBJECT_DATA = "object_data"
 
array $objectList
 
string $untranslatedTitle
 

Private Member Functions

 assignSystemInformationFromDB (array $data)
 
 buildSystemInformationArrayForDB ()
 
 prepareAndRetrievePasswordForStorage ()
 
 retrieveAgreeDateForStorage ()
 
 writeHistory (string $login)
 
 deleteAllPrefs ()
 
 readPrefs ()
 
 buildTextFromArray (array $a_attr)
 

Static Private Member Functions

static _lookup (int $a_user_id, string $a_field)
 

Private Attributes

string $ext_account = ''
 
string $fullname
 
bool $time_limit_unlimited = false
 
int $time_limit_until = null
 
int $time_limit_from = null
 
int $time_limit_owner = 7
 
string $last_login = ''
 
string $passwd = ''
 
string $passwd_type = ''
 
string $password_encoding_type = null
 
string $password_salt = null
 
string $approve_date = null
 
string $agree_date = null
 
int $active = 0
 
string $client_ip = ''
 
string $auth_mode = null
 
int $last_password_change_ts = 0
 
bool $passwd_policy_reset = false
 
int $login_attempts = 0
 
array $prefs = []
 
string $inactivation_date = null
 
bool $is_self_registered = false
 
string $last_profile_prompt = ''
 
string $first_login = ''
 
bool $profile_incomplete = false
 
Data $profile_data
 
ProfileDataRepository $profile_data_repository
 
ProfileConfigurationRepository $profile_configuration_repository
 
StreamDelivery $delivery
 
DataFactory $data_factory
 
ilCronDeleteInactiveUserReminderMail $cron_delete_user_reminder_mail
 
Services $irss
 
ilSetting $settings
 
ilAuthSession $auth_session
 
ilCtrl $ctrl
 

Static Private Attributes

static array $personal_image_cache = []
 

Additional Inherited Members

- Protected Member Functions inherited from ilObject
 doMDUpdateListener (string $a_element)
 
 beforeMDUpdateListener (string $a_element)
 
 doCreateMetaData ()
 
 beforeCreateMetaData ()
 
 doUpdateMetaData ()
 
 beforeUpdateMetaData ()
 
 doDeleteMetaData ()
 
 beforeDeleteMetaData ()
 
 handleAutoRating ()
 
 hasAutoRating ()
 
- Protected Attributes inherited from ilObject
ilLogger $obj_log
 
ILIAS $ilias
 
ilObjectDefinition $obj_definition
 
ilDBInterface $db
 
ilLogger $log
 
ilErrorHandling $error
 
ilTree $tree
 
ilAppEventHandler $app_event_handler
 
ilRbacAdmin $rbac_admin
 
ilRbacReview $rbac_review
 
ilObjUser $user
 
ilLanguage $lng
 
LOMServices $lom_services
 
bool $call_by_reference
 
int $max_title = self::TITLE_LENGTH
 
int $max_desc = self::DESC_LENGTH
 
bool $add_dots = true
 
int $ref_id = null
 
string $type = ""
 
string $title = ""
 
string $desc = ""
 
string $long_desc = ""
 
int $owner = 0
 
string $create_date = ""
 
string $last_update = ""
 
string $import_id = ""
 
bool $register = false
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjUser::__construct ( int  $a_user_id = 0,
bool  $a_call_by_reference = false 
)

Definition at line 92 of file class.ilObjUser.php.

95 {
96 global $DIC;
97 $this->irss = $DIC['resource_storage'];
98 $this->settings = $DIC['ilSetting'];
99 $this->auth_session = $DIC['ilAuthSession'];
100 $this->ctrl = $DIC['ilCtrl'];
101 $this->app_event_handler = $DIC['ilAppEventHandler'];
102 $this->delivery = $DIC['file_delivery']->delivery();
103
104 if (defined('USER_FOLDER_ID')) {
105 $this->time_limit_owner = USER_FOLDER_ID;
106 }
107
108 $local_dic = LocalDIC::dic();
109 $this->profile_data_repository = $local_dic[ProfileDataRepository::class];
110 $this->profile_data = $this->profile_data_repository->getDefault();
111 $this->profile_configuration_repository = $local_dic[ProfileConfigurationRepository::class];
112
113 $this->data_factory = (new DataFactory());
114
115 $this->type = 'usr';
116 parent::__construct($a_user_id, $a_call_by_reference);
117
118 $this->cron_delete_user_reminder_mail = new ilCronDeleteInactiveUserReminderMail($this->db);
119
120 $this->auth_mode = 'default';
121 $this->passwd_type = self::PASSWD_PLAIN;
122 if ($a_user_id > 0) {
123 $this->setId($a_user_id);
124 $this->read();
125 return;
126 }
127
128 $this->prefs = [];
129 $this->prefs['language'] = $this->ilias->ini->readVariable('language', 'default');
130 $this->prefs['skin'] = $this->ilias->ini->readVariable('layout', 'skin');
131 $this->prefs['style'] = $this->ilias->ini->readVariable('layout', 'style');
132 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const PASSWD_PLAIN
setId(int $id)
const USER_FOLDER_ID
Definition: constants.php:33
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Class ilObjForumAdministration.
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), PASSWD_PLAIN, read(), ilObject\setId(), ILIAS\Repository\settings(), and USER_FOLDER_ID.

+ Here is the call graph for this function:

Member Function Documentation

◆ _checkExternalAuthAccount()

static ilObjUser::_checkExternalAuthAccount ( string  $a_auth,
string  $a_account,
bool  $tryFallback = true 
)
static

check whether external account and authentication method matches with a user

Definition at line 2813 of file class.ilObjUser.php.

2817 : ?string {
2818 $db = $GLOBALS['DIC']->database();
2819 $settings = $GLOBALS['DIC']->settings();
2820
2821 // Check directly with auth_mode
2822 $r = $db->queryF(
2823 'SELECT * FROM usr_data WHERE ' .
2824 ' ext_account = %s AND auth_mode = %s',
2825 ['text', 'text'],
2826 [$a_account, $a_auth]
2827 );
2828 if ($usr = $db->fetchAssoc($r)) {
2829 return $usr['login'];
2830 }
2831
2832 if (!$tryFallback) {
2833 return null;
2834 }
2835
2836 // For compatibility, check for login (no ext_account entry given)
2837 $res = $db->queryF(
2838 'SELECT login FROM usr_data ' .
2839 'WHERE login = %s AND auth_mode = %s AND (ext_account IS NULL OR ext_account = "") ',
2840 ['text', 'text'],
2841 [$a_account, $a_auth]
2842 );
2843 if ($usr = $db->fetchAssoc($res)) {
2844 return $usr['login'];
2845 }
2846
2847 // If auth_default == $a_auth => check for login
2848 if (ilAuthUtils::_getAuthModeName($settings->get('auth_mode')) == $a_auth) {
2849 $res = $db->queryF(
2850 'SELECT login FROM usr_data WHERE ' .
2851 ' ext_account = %s AND auth_mode = %s',
2852 ['text', 'text'],
2853 [$a_account, 'default']
2854 );
2855 if ($usr = $db->fetchAssoc($res)) {
2856 return $usr['login'];
2857 }
2858 // Search for login (no ext_account given)
2859 $res = $db->queryF(
2860 'SELECT login FROM usr_data ' .
2861 'WHERE login = %s AND (ext_account IS NULL OR ext_account = "") AND auth_mode = %s',
2862 ['text', 'text'],
2863 [$a_account, 'default']
2864 );
2865 if ($usr = $db->fetchAssoc($res)) {
2866 return $usr['login'];
2867 }
2868 }
2869 return null;
2870 }
static _getAuthModeName($a_auth_key)
ilSetting $settings
ilDBInterface $db
get(string $a_keyword, ?string $a_default_value=null)
get setting
fetchAssoc(ilDBStatement $statement)
queryF(string $query, array $types, array $values)
$res
Definition: ltiservices.php:69
$GLOBALS["DIC"]
Definition: wac.php:54

Referenced by ilAuthProviderApache\doAuthentication(), ilLTIAppEventListener\doCronUpdate(), ilAuthProviderLTI\findUserId(), ilAuthFrontend\handleLoginAttempts(), ilAuthProviderSaml\handleSamlAuth(), ilAuthProviderSoap\handleSoapAuth(), ilUserImportParser\importEndTag(), ilLDAPUserSynchronisation\readInternalAccount(), ilLDAPQuery\readUserData(), ilECSCmsCourseMemberCommandQueueHandler\refreshAssignmentStatus(), ilOpenIdConnectUserSync\updateUser(), and ilUserImportParser\verifyEndTag().

+ Here is the caller graph for this function:

◆ _doesLoginnameExistInHistory()

static ilObjUser::_doesLoginnameExistInHistory ( string  $a_login)
static

Definition at line 2453 of file class.ilObjUser.php.

2453 : bool
2454 {
2455 global $DIC;
2456 $ilDB = $DIC['ilDB'];
2457
2458 $res = $ilDB->queryF(
2459 '
2460 SELECT * FROM loginname_history
2461 WHERE login = %s',
2462 ['text'],
2463 [$a_login]
2464 );
2465
2466 return (bool) $ilDB->fetchAssoc($res);
2467 }

References $DIC, $ilDB, and $res.

Referenced by ilAccountRegistrationGUI\saveForm().

+ Here is the caller graph for this function:

◆ _externalAccountExists()

static ilObjUser::_externalAccountExists ( string  $a_external_account,
string  $a_auth_mode 
)
static

Definition at line 1960 of file class.ilObjUser.php.

1963 : bool {
1964 global $DIC;
1965 $ilDB = $DIC['ilDB'];
1966
1967 $res = $ilDB->queryF(
1968 'SELECT * FROM usr_data ' .
1969 'WHERE ext_account = %s AND auth_mode = %s',
1970 ['text', 'text'],
1971 [$a_external_account, $a_auth_mode]
1972 );
1973 return (bool) $ilDB->fetchAssoc($res);
1974 }

◆ _getAllUserAssignedStyles()

static ilObjUser::_getAllUserAssignedStyles ( )
static

Definition at line 3012 of file class.ilObjUser.php.

3012 : array
3013 {
3014 global $DIC;
3015 $ilDB = $DIC['ilDB'];
3016
3017 $q = 'SELECT DISTINCT up1.value style, up2.value skin FROM usr_pref up1, usr_pref up2 ' .
3018 ' WHERE up1.keyword = ' . $ilDB->quote('style', 'text') .
3019 ' AND up2.keyword = ' . $ilDB->quote('skin', 'text') .
3020 ' AND up1.usr_id = up2.usr_id';
3021
3022 $sty_set = $ilDB->query($q);
3023
3024 $styles = [];
3025 while ($sty_rec = $ilDB->fetchAssoc($sty_set)) {
3026 $styles[] = $sty_rec['skin'] . ':' . $sty_rec['style'];
3027 }
3028
3029 return $styles;
3030 }
$q
Definition: shib_logout.php:23

References $DIC, $ilDB, and $q.

Referenced by ilSystemStylesTableGUI\getStyles(), and ilSystemStyleOverviewGUI\moveUserStyles().

+ Here is the caller graph for this function:

◆ _getAvatar()

static ilObjUser::_getAvatar ( int  $a_usr_id)
static

Definition at line 3166 of file class.ilObjUser.php.

3166 : Avatar
3167 {
3168 $define = new ilUserAvatarResolver($a_usr_id ?: ANONYMOUS_USER_ID);
3169 $define->setSize('xsmall');
3170 return $define->getAvatar();
3171 }
Class ilUserAvatarResolver.
const ANONYMOUS_USER_ID
Definition: constants.php:27
This describes how a letter or a picture avatar could be modified during construction of UI.
Definition: Avatar.php:29

References ANONYMOUS_USER_ID.

Referenced by ilWikiContributorsTableGUI\fillRow(), ILIAS\Repository\Profile\ProfileGUI\getAvatar(), and ilMessageGUI\getItemTitle().

+ Here is the caller graph for this function:

◆ _getExternalAccountsByAuthMode()

static ilObjUser::_getExternalAccountsByAuthMode ( string  $a_auth_mode,
bool  $a_read_auth_default = false 
)
static

Get list of external account by authentication method Note: If login == ext_account for two user with auth_mode 'default' and auth_mode 'ldap' The ldap auth mode chosen.

Parameters
bool$a_read_auth_defaultalso get users with authentication method 'default'

Definition at line 2745 of file class.ilObjUser.php.

2748 : array {
2749 global $DIC;
2750
2751 $ilDB = $DIC['ilDB'];
2752 $ilSetting = $DIC['ilSetting'];
2753
2754 $q = 'SELECT login,usr_id,ext_account,auth_mode FROM usr_data ' .
2755 'WHERE auth_mode = %s';
2756 $types[] = 'text';
2757 $values[] = $a_auth_mode;
2758 if ($a_read_auth_default and ilAuthUtils::_getAuthModeName($ilSetting->get('auth_mode', ilAuthUtils::AUTH_LOCAL)) == $a_auth_mode) {
2759 $q .= ' OR auth_mode = %s ';
2760 $types[] = 'text';
2761 $values[] = 'default';
2762 }
2763
2764 $res = $ilDB->queryF($q, $types, $values);
2765 $accounts = [];
2766 while ($row = $ilDB->fetchObject($res)) {
2767 if ($row->auth_mode == 'default') {
2768 $accounts[$row->usr_id] = $row->login;
2769 } else {
2770 $accounts[$row->usr_id] = $row->ext_account;
2771 }
2772 }
2773 return $accounts;
2774 }
const int AUTH_LOCAL
global $ilSetting
Definition: privfeed.php:31

References $q.

Referenced by ilLDAPCronSynchronization\deactivateUsers(), ILIAS\LDAP\Server\UI\ServerTable\getRecords(), and ilLDAPRoleGroupMapping\initServers().

+ Here is the caller graph for this function:

◆ _getFeedPass()

static ilObjUser::_getFeedPass ( int  $a_user_id)
static

Definition at line 3237 of file class.ilObjUser.php.

3239 : ?string {
3240 if ($a_user_id > 0) {
3241 return self::_lookupPref($a_user_id, 'priv_feed_pass');
3242 }
3243 return null;
3244 }
static _lookupPref(int $a_usr_id, string $a_keyword)

Referenced by ilPDNewsBlockGUI\initPrivateSettingsForm(), and ilPDNewsBlockGUI\showFeedUrl().

+ Here is the caller graph for this function:

◆ _getImportedUserId()

static ilObjUser::_getImportedUserId ( string  $i2_id)
static

Definition at line 3143 of file class.ilObjUser.php.

3145 : int {
3146 global $DIC;
3147 $ilDB = $DIC['ilDB'];
3148
3149 $query = 'SELECT obj_id FROM object_data WHERE import_id = ' .
3150 $ilDB->quote($i2_id, 'text');
3151
3152 $res = $ilDB->query($query);
3153 $id = 0;
3154 while ($row = $ilDB->fetchObject($res)) {
3155 $id = (int) $row->obj_id;
3156 }
3157 return $id;
3158 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

References $id, and ILIAS\Repository\int().

Referenced by ilCourseXMLParser\__parseId(), and ilGroupXMLParser\parseId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getLocalAccountsForEmail()

static ilObjUser::_getLocalAccountsForEmail ( string  $a_email)
static

Definition at line 3051 of file class.ilObjUser.php.

3051 : array // Missing array type.
3052 {
3053 global $DIC;
3054
3055 $ilDB = $DIC['ilDB'];
3056 $ilSetting = $DIC['ilSetting'];
3057
3058 // default set to local (1)?
3059
3060 $q = 'SELECT * FROM usr_data WHERE ' .
3061 ' email = %s AND (auth_mode = %s ';
3062 $types = ['text', 'text'];
3063 $values = [$a_email, 'local'];
3064
3065 if ($ilSetting->get('auth_mode') == 1) {
3066 $q .= ' OR auth_mode = %s';
3067 $types[] = 'text';
3068 $values[] = 'default';
3069 }
3070
3071 $q .= ')';
3072
3073 $users = [];
3074 $usr_set = $ilDB->queryF($q, $types, $values);
3075 while ($usr_rec = $ilDB->fetchAssoc($usr_set)) {
3076 $users[$usr_rec['usr_id']] = $usr_rec['login'];
3077 }
3078
3079 return $users;
3080 }

References $DIC, $ilDB, $ilSetting, and $q.

◆ _getLoginAttempts()

static ilObjUser::_getLoginAttempts ( int  $a_usr_id)
static

Definition at line 2181 of file class.ilObjUser.php.

2183 : int {
2184 global $DIC;
2185 $ilDB = $DIC['ilDB'];
2186
2187 $query = 'SELECT login_attempts FROM usr_data WHERE usr_id = %s';
2188 $result = $ilDB->queryF($query, ['integer'], [$a_usr_id]);
2189 $record = $ilDB->fetchAssoc($result);
2190 return (int) ($record['login_attempts'] ?? 0);
2191 }

Referenced by ilAuthFrontend\checkExceededLoginAttempts(), and ilAuthFrontend\handleLoginAttempts().

+ Here is the caller graph for this function:

◆ _getNumberOfUsersForStyle()

static ilObjUser::_getNumberOfUsersForStyle ( string  $a_skin,
string  $a_style 
)
static

Definition at line 2991 of file class.ilObjUser.php.

2994 : int {
2995 global $DIC;
2996 $ilDB = $DIC['ilDB'];
2997
2998 $q = 'SELECT count(*) as cnt FROM usr_pref up1, usr_pref up2 ' .
2999 ' WHERE up1.keyword= ' . $ilDB->quote('style', 'text') .
3000 ' AND up1.value= ' . $ilDB->quote($a_style, 'text') .
3001 ' AND up2.keyword= ' . $ilDB->quote('skin', 'text') .
3002 ' AND up2.value= ' . $ilDB->quote($a_skin, 'text') .
3003 ' AND up1.usr_id = up2.usr_id ';
3004
3005 $cnt_set = $ilDB->query($q);
3006
3007 $cnt_rec = $ilDB->fetchAssoc($cnt_set);
3008
3009 return (int) $cnt_rec['cnt'];
3010 }

Referenced by ilSystemStyleOverviewGUI\checkStyleSettings(), ilStyleDefinition\getAllSkinStyles(), and ilSystemStylesTableGUI\getStyles().

+ Here is the caller graph for this function:

◆ _getNumberOfUsersPerAuthMode()

static ilObjUser::_getNumberOfUsersPerAuthMode ( )
static

get number of users per auth mode

Definition at line 3035 of file class.ilObjUser.php.

3035 : array // Missing array type.
3036 {
3037 global $DIC;
3038
3039 $ilDB = $DIC['ilDB'];
3040
3041 $r = $ilDB->query('SELECT count(*) AS cnt, auth_mode FROM usr_data ' .
3042 'GROUP BY auth_mode');
3043 $cnt_arr = [];
3044 while ($cnt = $ilDB->fetchAssoc($r)) {
3045 $cnt_arr[$cnt['auth_mode']] = (int) $cnt['cnt'];
3046 }
3047
3048 return $cnt_arr;
3049 }

References $DIC, $ilDB, and ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ _getPersonalPicturePath()

static ilObjUser::_getPersonalPicturePath ( int  $a_usr_id,
string  $a_size = 'small',
bool  $a_force_pic = false 
)
static

Definition at line 3173 of file class.ilObjUser.php.

3177 : string {
3178 $define = new ilUserAvatarResolver($a_usr_id);
3179 $define->setForcePicture($a_force_pic);
3180 $define->setSize($a_size);
3181 return $define->getLegacyPictureURL();
3182 }

Referenced by ilRepositoryUserResultTableGUI\fillRow(), ILIAS\User\Profile\PublicProfileGUI\getEmbeddable(), ILIAS\Awareness\WidgetManager\getListData(), ilUserUtil\getNamePresentation(), ilInternalLinkGUI\getUserSearchResult(), ilUserDataSet\getXmlRecord(), ilLikeGUI\renderModal(), ILIAS\User\Profile\PublicProfileGUI\renderTitle(), and ilMStShowUserGUI\setTitleAndIcon().

+ Here is the caller graph for this function:

◆ _getPreferences()

static ilObjUser::_getPreferences ( int  $user_id)
static

Definition at line 2140 of file class.ilObjUser.php.

2140 : array
2141 {
2142 global $DIC;
2143 $ilDB = $DIC['ilDB'];
2144
2145 $prefs = [];
2146
2147 $r = $ilDB->queryF(
2148 'SELECT * FROM usr_pref WHERE usr_id = %s',
2149 ['integer'],
2150 [$user_id]
2151 );
2152
2153 while ($row = $ilDB->fetchAssoc($r)) {
2154 $prefs[$row['keyword']] = $row['value'];
2155 }
2156
2157 return $prefs;
2158 }

References $DIC, $ilDB, and $user_id.

Referenced by ilUserXMLWriter\__handleUser(), and ilConsultationHoursTableGUI\fillRow().

+ Here is the caller graph for this function:

◆ _getUserData()

static ilObjUser::_getUserData ( array  $a_internalids)
static

Definition at line 2100 of file class.ilObjUser.php.

2100 : array
2101 {
2102 global $DIC;
2103 $ilDB = $DIC['ilDB'];
2104
2105 $ids = [];
2106 if (is_array($a_internalids)) {
2107 foreach ($a_internalids as $internalid) {
2108 if (is_numeric($internalid)) {
2109 $ids[] = $internalid;
2110 } else {
2111 $parsedid = ilUtil::__extractId($internalid, IL_INST_ID);
2112 if (is_numeric($parsedid) && $parsedid > 0) {
2113 $ids[] = $parsedid;
2114 }
2115 }
2116 }
2117 }
2118 if (count($ids) == 0) {
2119 $ids [] = -1;
2120 }
2121
2122 $query = 'SELECT usr_data.*, usr_pref.value AS language
2123 FROM usr_data
2124 LEFT JOIN usr_pref
2125 ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
2126 WHERE ' . $ilDB->in('usr_data.usr_id', $ids, false, 'integer');
2127 $values[] = 'language';
2128 $types[] = 'text';
2129
2130 $query .= ' ORDER BY usr_data.lastname, usr_data.firstname ';
2131
2132 $data = [];
2133 $result = $ilDB->queryF($query, $types, $values);
2134 while ($row = $ilDB->fetchAssoc($result)) {
2135 $data[] = $row;
2136 }
2137 return $data;
2138 }
static __extractId(string $ilias_id, int $inst_id)
extract ref id from role title, e.g.
const IL_INST_ID
Definition: constants.php:40

References $data, $DIC, $ilDB, ilUtil\__extractId(), and IL_INST_ID.

Referenced by ilSoapUserAdministration\getUserXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getUserIdsByInactivationPeriod()

static ilObjUser::_getUserIdsByInactivationPeriod ( int  $period)
static

Definition at line 2392 of file class.ilObjUser.php.

2394 : array {
2395 if (!$period) {
2396 throw new ilException('no valid period given');
2397 }
2398
2399 global $DIC;
2400 $db = $DIC['ilDB'];
2401
2402 $res = $db->queryF(
2403 'SELECT usr_id FROM usr_data WHERE inactivation_date < %s AND active = %s',
2404 ['timestamp', 'integer'],
2405 [
2406 date('Y-m-d H:i:s', (time() - ($period * 24 * 60 * 60))),
2407 0
2408 ]
2409 );
2410
2411 $ids = [];
2412 while ($row = $db->fetchObject($res)) {
2413 $ids[] = (int) $row->usr_id;
2414 }
2415
2416 return $ids;
2417 }
Base class for ILIAS Exception handling.
fetchObject(ilDBStatement $query_result)

Referenced by ilCronDeleteInactivatedUserAccounts\run().

+ Here is the caller graph for this function:

◆ _getUsersForClipboadObject()

static ilObjUser::_getUsersForClipboadObject ( string  $a_type,
int  $a_id 
)
static

Definition at line 3124 of file class.ilObjUser.php.

3127 : array {
3128 global $DIC;
3129 $ilDB = $DIC['ilDB'];
3130
3131 $q = 'SELECT DISTINCT user_id FROM personal_clipboard WHERE ' .
3132 'item_id = ' . $ilDB->quote($a_id, 'integer') . ' AND ' .
3133 'type = ' . $ilDB->quote($a_type, 'text');
3134 $user_set = $ilDB->query($q);
3135 $users = [];
3136 while ($user_rec = $ilDB->fetchAssoc($user_set)) {
3137 $users[] = (int) $user_rec['user_id'];
3138 }
3139
3140 return $users;
3141 }

References ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ _getUsersForFolder()

static ilObjUser::_getUsersForFolder ( int  $ref_id,
int  $active 
)
static

Definition at line 2014 of file class.ilObjUser.php.

2017 : array {
2018 global $DIC;
2019 $ilDB = $DIC['ilDB'];
2020
2021 $query = 'SELECT usr_data.*, usr_pref.value AS language FROM usr_data LEFT JOIN usr_pref ON usr_pref.usr_id = usr_data.usr_id and usr_pref.keyword = %s WHERE 1=1';
2022 $types[] = 'text';
2023 $values[] = 'language';
2024
2025 if (is_numeric($active) && $active > -1) {
2026 $query .= ' AND usr_data.active = %s';
2027 $values[] = $active;
2028 $types[] = 'integer';
2029 }
2030
2031 if ($ref_id != USER_FOLDER_ID) {
2032 $query .= ' AND usr_data.time_limit_owner = %s';
2033 $values[] = $ref_id;
2034 $types[] = 'integer';
2035 }
2036
2037 $query .= ' AND usr_data.usr_id != %s ';
2038 $values[] = ANONYMOUS_USER_ID;
2039 $types[] = 'integer';
2040
2041 $query .= ' ORDER BY usr_data.lastname, usr_data.firstname ';
2042
2043 $result = $ilDB->queryF($query, $types, $values);
2044 $data = [];
2045 while ($row = $ilDB->fetchAssoc($result)) {
2046 $data[] = $row;
2047 }
2048
2049 return $data;
2050 }

Referenced by ilSoapUserAdministration\getUsersForContainer().

+ Here is the caller graph for this function:

◆ _getUsersForGroup()

static ilObjUser::_getUsersForGroup ( array  $a_mem_ids,
int  $active = -1 
)
static

Definition at line 2052 of file class.ilObjUser.php.

2055 : array {
2056 return self::_getUsersForIds($a_mem_ids, $active);
2057 }
static _getUsersForIds(array $a_mem_ids, int $active=-1, int $timelimitowner=-1)

Referenced by ilSoapUserAdministration\getUsersForContainer().

+ Here is the caller graph for this function:

◆ _getUsersForIds()

static ilObjUser::_getUsersForIds ( array  $a_mem_ids,
int  $active = -1,
int  $timelimitowner = -1 
)
static

Definition at line 2059 of file class.ilObjUser.php.

2063 : array {
2064 global $DIC;
2065 $ilDB = $DIC['ilDB'];
2066
2067 $query = 'SELECT usr_data.*, usr_pref.value AS language
2068 FROM usr_data
2069 LEFT JOIN usr_pref ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
2070 WHERE ' . $ilDB->in('usr_data.usr_id', $a_mem_ids, false, 'integer') . '
2071 AND usr_data.usr_id != %s';
2072 $values[] = 'language';
2073 $types[] = 'text';
2074 $values[] = ANONYMOUS_USER_ID;
2075 $types[] = 'integer';
2076
2077 if (is_numeric($active) && $active > -1) {
2078 $query .= ' AND active = %s';
2079 $values[] = $active;
2080 $types[] = 'integer';
2081 }
2082
2083 if ($timelimitowner != USER_FOLDER_ID && $timelimitowner != -1) {
2084 $query .= ' AND usr_data.time_limit_owner = %s';
2085 $values[] = $timelimitowner;
2086 $types[] = 'integer';
2087 }
2088
2089 $query .= ' ORDER BY usr_data.lastname, usr_data.firstname ';
2090
2091 $result = $ilDB->queryF($query, $types, $values);
2092 $mem_arr = [];
2093 while ($row = $ilDB->fetchAssoc($result)) {
2094 $mem_arr[] = $row;
2095 }
2096
2097 return $mem_arr;
2098 }

Referenced by ilSoapUserAdministration\getUsersForContainer().

+ Here is the caller graph for this function:

◆ _getUsersForRole()

static ilObjUser::_getUsersForRole ( int  $role_id,
int  $active = -1 
)
static

Definition at line 1976 of file class.ilObjUser.php.

1979 : array {
1980 global $DIC;
1981 $ilDB = $DIC['ilDB'];
1982 $rbacreview = $DIC['rbacreview'];
1983
1984 $ids = $rbacreview->assignedUsers($role_id);
1985
1986 if (count($ids) == 0) {
1987 $ids = [-1];
1988 }
1989
1990 $query = 'SELECT usr_data.*, usr_pref.value AS language
1991 FROM usr_data
1992 LEFT JOIN usr_pref ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
1993 WHERE ' . $ilDB->in('usr_data.usr_id', $ids, false, 'integer');
1994 $values[] = 'language';
1995 $types[] = 'text';
1996
1997
1998 if (is_numeric($active) && $active > -1) {
1999 $query .= ' AND usr_data.active = %s';
2000 $values[] = $active;
2001 $types[] = 'integer';
2002 }
2003
2004 $query .= ' ORDER BY usr_data.lastname, usr_data.firstname ';
2005
2006 $r = $ilDB->queryF($query, $types, $values);
2007 $data = [];
2008 while ($row = $ilDB->fetchAssoc($r)) {
2009 $data[] = $row;
2010 }
2011 return $data;
2012 }

Referenced by ilSoapUserAdministration\getUserForRole().

+ Here is the caller graph for this function:

◆ _getUsersOnline()

static ilObjUser::_getUsersOnline ( int  $a_user_id = 0,
bool  $a_no_anonymous = false 
)
static

Definition at line 2225 of file class.ilObjUser.php.

2228 : array {
2229 global $DIC;
2230 $ilDB = $DIC['ilDB'];
2231
2233
2234 $pd_set = new ilSetting('pd');
2235 $atime = $pd_set->get('user_activity_time') * 60;
2236 $ctime = time();
2237
2238 $where = [];
2239
2240 if ($a_user_id === 0) {
2241 $where[] = 'user_id > 0';
2242 } else {
2243 $where[] = 'user_id = ' . $ilDB->quote($a_user_id, 'integer');
2244 }
2245
2246 if ($a_no_anonymous) {
2247 $where[] = 'user_id != ' . $ilDB->quote(ANONYMOUS_USER_ID, 'integer');
2248 }
2249
2250 if (ilUserAccountSettings::getInstance()->isUserAccessRestricted()) {
2251 $where[] = $ilDB->in('time_limit_owner', ilUserFilter::getInstance()->getFolderIds(), false, 'integer');
2252 }
2253
2254 $where[] = 'expires > ' . $ilDB->quote($ctime, 'integer');
2255 $where[] = '(p.value IS NULL OR NOT p.value = ' . $ilDB->quote('y', 'text') . ')';
2256
2257 $where = 'WHERE ' . implode(' AND ', $where);
2258
2259 $r = $ilDB->queryF(
2260 $q = "
2261 SELECT COUNT(user_id) num, user_id, firstname, lastname, title, login, last_login, MAX(ctime) ctime, context, agree_date
2262 FROM usr_session
2263 LEFT JOIN usr_data u
2264 ON user_id = u.usr_id
2265 LEFT JOIN usr_pref p
2266 ON (p.usr_id = u.usr_id AND p.keyword = %s)
2267 {$where}
2268 GROUP BY user_id, firstname, lastname, title, login, last_login, context, agree_date
2269 ORDER BY lastname, firstname
2270 ",
2271 ['text'],
2272 ['hide_own_online_status']
2273 );
2274
2275 $log->debug('Query: ' . $q);
2276
2277 $users = [];
2278 while ($user = $ilDB->fetchAssoc($r)) {
2279 if ($atime <= 0 || $user['ctime'] + $atime > $ctime) {
2280 $users[$user['user_id']] = $user;
2281 }
2282 }
2283
2284 $log->debug('Found users: ' . count($users));
2285
2286 $hide_users = $DIC['legalDocuments']->usersWithHiddenOnlineStatus(array_map(intval(...), array_column($users, 'user_id')));
2287 $users = array_filter(
2288 $users,
2289 fn($user) => !in_array((int) $user['user_id'], $hide_users, true)
2290 );
2291
2292 return $users;
2293 }
static getLogger(string $a_component_id)
Get component logger.
debug(string $message, array $context=[])
ilLogger $log
ilObjUser $user
ILIAS Setting Class.

Referenced by ILIAS\Awareness\User\Collector\getOnlineUsers().

+ Here is the caller graph for this function:

◆ _incrementLoginAttempts()

static ilObjUser::_incrementLoginAttempts ( int  $a_usr_id)
static

Definition at line 2193 of file class.ilObjUser.php.

2195 : bool {
2196 global $DIC;
2197 $ilDB = $DIC['ilDB'];
2198
2199 $query = 'UPDATE usr_data SET login_attempts = (login_attempts + 1) WHERE usr_id = %s';
2200 $affected = $ilDB->manipulateF($query, ['integer'], [$a_usr_id]);
2201
2202 if ($affected) {
2203 return true;
2204 } else {
2205 return false;
2206 }
2207 }

Referenced by ilAuthFrontend\handleLoginAttempts().

+ Here is the caller graph for this function:

◆ _isAnonymous()

◆ _loginExists()

static ilObjUser::_loginExists ( string  $a_login,
int  $a_user_id = 0 
)
static

Definition at line 1934 of file class.ilObjUser.php.

1937 : ?int {
1938 global $DIC;
1939 $ilDB = $DIC['ilDB'];
1940
1941 $q = 'SELECT DISTINCT login, usr_id FROM usr_data ' .
1942 'WHERE login = %s';
1943 $types[] = 'text';
1944 $values[] = $a_login;
1945
1946 if ($a_user_id != 0) {
1947 $q .= ' AND usr_id != %s ';
1948 $types[] = 'integer';
1949 $values[] = $a_user_id;
1950 }
1951
1952 $r = $ilDB->queryF($q, $types, $values);
1953
1954 if (($row = $ilDB->fetchAssoc($r))) {
1955 return (int) $row['usr_id'];
1956 }
1957 return null;
1958 }

References $q.

Referenced by ilUserLoginInputGUI\checkInput(), ilECSAppEventListener\handleNewAccountCreation(), ilAuthProviderSaml\handleSamlAuth(), ilCalendarAppointmentGUI\loadNotificationRecipients(), ilLuceneQueryParser\replaceOwnerCallback(), ilAccountRegistrationGUI\saveForm(), ilObjEmployeeTalkSeriesGUI\saveObject(), ilConsultationHourAppointments\setManager(), and ILIAS\User\Profile\PersonalProfileGUI\updateLoginOrSetErrorMessages().

+ Here is the caller graph for this function:

◆ _lookup()

static ilObjUser::_lookup ( int  $a_user_id,
string  $a_field 
)
staticprivate

Definition at line 2562 of file class.ilObjUser.php.

2565 : ?string {
2566 global $DIC;
2567 $ilDB = $DIC['ilDB'];
2568
2569 $res = $ilDB->queryF(
2570 'SELECT ' . $a_field . ' FROM usr_data WHERE usr_id = %s',
2571 ['integer'],
2572 [$a_user_id]
2573 );
2574
2575 while ($set = $ilDB->fetchAssoc($res)) {
2576 return $set[$a_field];
2577 }
2578 return null;
2579 }

◆ _lookupActive()

static ilObjUser::_lookupActive ( int  $a_usr_id)
static

Definition at line 2714 of file class.ilObjUser.php.

2714 : bool
2715 {
2716 global $DIC;
2717 $ilDB = $DIC['ilDB'];
2718
2719 $query = 'SELECT usr_id FROM usr_data ' .
2720 'WHERE active = ' . $ilDB->quote(1, 'integer') . ' ' .
2721 'AND usr_id = ' . $ilDB->quote($a_usr_id, 'integer');
2722 $res = $ilDB->query($query);
2723 while ($res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
2724 return true;
2725 }
2726 return false;
2727 }

References $DIC, $ilDB, $res, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilMailSearchObjectGUI\doesExposeMembers(), ilLearningSequenceParticipantsTableGUI\fillRow(), ILIAS\Contact\BuddySystem\Tables\RelationsTable\filter(), and ILIAS\Contact\Provider\ContactNotificationProvider\getNotifications().

+ Here is the caller graph for this function:

◆ _lookupAuthMode()

static ilObjUser::_lookupAuthMode ( int  $a_usr_id)
static

Definition at line 2804 of file class.ilObjUser.php.

2804 : string
2805 {
2806 return (string) self::_lookup($a_usr_id, 'auth_mode');
2807 }
static _lookup(int $a_user_id, string $a_field)

Referenced by ilLTIAppEventListener\handleOutcomeWithoutLP(), and ilLTIAppEventListener\handleUpdateStatus().

+ Here is the caller graph for this function:

◆ _lookupClientIP()

static ilObjUser::_lookupClientIP ( int  $a_user_id)
static

Definition at line 2618 of file class.ilObjUser.php.

2618 : string
2619 {
2620 return self::_lookup($a_user_id, 'client_ip') ?? '';
2621 }

◆ _lookupEmail()

static ilObjUser::_lookupEmail ( int  $a_user_id)
static

Definition at line 2608 of file class.ilObjUser.php.

2608 : string
2609 {
2610 return self::_lookup($a_user_id, 'email') ?? '';
2611 }

Referenced by ilObjSurvey\getAppraiseesData(), ilAccessibilitySupportContacts\getMailsToAddress(), ilSystemSupportContacts\getMailsToAddress(), ilUserCronCheckAccounts\run(), ilBadgeHandler\sendNotification(), and ilMailSearchGUI\showResults().

+ Here is the caller graph for this function:

◆ _lookupExternalAccount()

static ilObjUser::_lookupExternalAccount ( int  $a_user_id)
static

Definition at line 2734 of file class.ilObjUser.php.

2734 : string
2735 {
2736 return (string) self::_lookup($a_user_id, 'ext_account') ?? '';
2737 }

Referenced by ilECSAppEventListener\handleNewAccountCreation(), ilLTIAppEventListener\handleOutcomeWithoutLP(), ilLTIAppEventListener\handleUpdateStatus(), ilUserImportParser\importEndTag(), ilAuthProviderECS\resumeCurrentSession(), and ilUserImportParser\verifyEndTag().

+ Here is the caller graph for this function:

◆ _lookupFeedHash()

static ilObjUser::_lookupFeedHash ( int  $a_user_id,
bool  $a_create = false 
)
static

Definition at line 3206 of file class.ilObjUser.php.

3209 : ?string {
3210 global $DIC;
3211 $ilDB = $DIC['ilDB'];
3212
3213 if ($a_user_id > 0) {
3214 $set = $ilDB->queryF(
3215 'SELECT feed_hash from usr_data WHERE usr_id = %s',
3216 ['integer'],
3217 [$a_user_id]
3218 );
3219 if ($rec = $ilDB->fetchAssoc($set)) {
3220 if (strlen($rec['feed_hash']) == 32) {
3221 return $rec['feed_hash'];
3222 } elseif ($a_create) {
3223 $hash = md5(random_int(1, 9999999) + str_replace(' ', '', microtime()));
3224 $ilDB->manipulateF(
3225 'UPDATE usr_data SET feed_hash = %s' .
3226 ' WHERE usr_id = %s',
3227 ['text', 'integer'],
3228 [$hash, $a_user_id]
3229 );
3230 return $hash;
3231 }
3232 }
3233 }
3234 return null;
3235 }

References $ilDB.

Referenced by ilUserFeedWriter\__construct(), ilNewsForContextBlockGUI\showFeedUrl(), and ilPDNewsBlockGUI\showFeedUrl().

+ Here is the caller graph for this function:

◆ _lookupFields()

static ilObjUser::_lookupFields ( int  $a_user_id)
static
Deprecated:

Definition at line 2700 of file class.ilObjUser.php.

2700 : array // Missing array type.
2701 {
2702 global $DIC;
2703 $ilDB = $DIC['ilDB'];
2704
2705 $res = $ilDB->queryF(
2706 'SELECT * FROM usr_data WHERE usr_id = %s',
2707 ['integer'],
2708 [$a_user_id]
2709 );
2710 $user_rec = $ilDB->fetchAssoc($res);
2711 return $user_rec;
2712 }

References $DIC, $ilDB, and $res.

Referenced by ILIAS\Test\ExportImport\ResultsExportExcel\getUserFieldsForUserID(), and ilCertificateUserObjectHelper\lookupFields().

+ Here is the caller graph for this function:

◆ _lookupFirstLogin()

static ilObjUser::_lookupFirstLogin ( int  $a_user_id)
static

Definition at line 2954 of file class.ilObjUser.php.

2954 : string
2955 {
2956 return self::_lookup($a_user_id, 'first_login') ?? '';
2957 }

Referenced by ilFirstLoginLearningHistoryProvider\getEntries().

+ Here is the caller graph for this function:

◆ _lookupFullname()

static ilObjUser::_lookupFullname ( int  $a_user_id)
static

Definition at line 2581 of file class.ilObjUser.php.

2581 : string
2582 {
2583 global $DIC;
2584 $ilDB = $DIC['ilDB'];
2585
2586 $fullname = '';
2587
2588 $set = $ilDB->queryF(
2589 'SELECT title, firstname, lastname FROM usr_data WHERE usr_id = %s',
2590 ['integer'],
2591 [$a_user_id]
2592 );
2593
2594 if ($rec = $ilDB->fetchAssoc($set)) {
2595 if ($rec['title']) {
2596 $fullname = $rec['title'] . ' ';
2597 }
2598 if ($rec['firstname']) {
2599 $fullname .= $rec['firstname'] . ' ';
2600 }
2601 if ($rec['lastname']) {
2602 $fullname .= $rec['lastname'];
2603 }
2604 }
2605 return $fullname;
2606 }
string $fullname

References $DIC, and $ilDB.

Referenced by ilCalendarAppointmentGUI\book(), ilBookingProcessWithoutScheduleGUI\bookMultipleParticipants(), ILIAS\AccessControl\Log\Table\buildChangeColumn(), ilObjStudyProgrammeIndividualPlanGUI\buildFrame(), ilCalendarAppointmentGUI\cancelBooking(), ilAppointmentPresentationConsultationHoursGUI\collectPropertiesAndActions(), ilObjStudyProgrammeMembersGUI\confirmRemoveUsers(), ILIAS\Calendar\ConsultationHours\BookingCancellationGUI\getBookingInfo(), ilLPTableBaseGUI\getExportMeta(), ilCalendarAppointmentPanelGUI\getHTML(), ilCalendarBlockGUI\getHTML(), ILIAS\Calendar\ConsultationHours\BookingCancellationGUI\getInputs(), ilExAssignmentTeamLogTableGUI\getItems(), ilLearningModuleNotification\getMailBody(), ilConsultationHourAppointments\getManager(), ilExAssignmentTeam\getTeamId(), ilSCORMTrackingItemPerUserTableGUI\initTable(), ilSCORMTrackingItemsPerUserTableGUI\initTable(), ilBookingEntry\lookupManagedBookingsForObject(), ilConsultationHoursTableGUI\parse(), ilSCORMTrackingItemsScoTableGUI\parse(), ilAssignmentsPerParticipantTableGUI\parseData(), ilCalendarPresentationGUI\prepareOutput(), ilTestEvaluationGUI\printResults(), ILIAS\Calendar\ConsultationHours\BookingDataProvider\read(), ilCalendarCategories\readConsultationHoursCalendar(), ilObjStudyProgrammeMembersGUI\removeCertificate(), ilObjStudyProgrammeMembersGUI\removeCertificateMulti(), ilCalendarMailNotification\send(), ilConsultationHoursGUI\sendInfoAboutUnassignedUsers(), ilExAssignmentReminder\sendReminders(), ilObjSurvey\sendTutorNotification(), ilTestEvaluationGUI\showResults(), ilObjStudyProgrammeMembersGUI\updateCertificate(), ilObjStudyProgrammeMembersGUI\updateCertificateMulti(), ilObjStudyProgrammeMembersGUI\updateFromCurrentPlan(), and ilObjStudyProgrammeMembersGUI\updateFromCurrentPlanMulti().

+ Here is the caller graph for this function:

◆ _lookupGender()

static ilObjUser::_lookupGender ( int  $a_user_id)
static

Definition at line 2613 of file class.ilObjUser.php.

2613 : string
2614 {
2615 return (string) self::_lookup($a_user_id, 'gender') ?? '';
2616 }

Referenced by ilMail\getSalutation().

+ Here is the caller graph for this function:

◆ _lookupId()

static ilObjUser::_lookupId ( string|array  $a_user_str)
static

Definition at line 2915 of file class.ilObjUser.php.

2917 : int|null|array {
2918 global $DIC;
2919 $ilDB = $DIC['ilDB'];
2920
2921 if (!is_array($a_user_str)) {
2922 $res = $ilDB->queryF(
2923 'SELECT usr_id FROM usr_data WHERE login = %s',
2924 ['text'],
2925 [$a_user_str]
2926 );
2927
2928 $user_rec = $ilDB->fetchAssoc($res);
2929 if (is_array($user_rec)) {
2930 return (int) $user_rec['usr_id'];
2931 }
2932
2933 return null;
2934 }
2935
2936 $set = $ilDB->query(
2937 'SELECT usr_id FROM usr_data ' .
2938 ' WHERE ' . $ilDB->in('login', $a_user_str, false, 'text')
2939 );
2940
2941 $ids = [];
2942 while ($rec = $ilDB->fetchAssoc($set)) {
2943 $ids[] = (int) $rec['usr_id'];
2944 }
2945
2946 return $ids;
2947 }

References $ilDB, and $res.

Referenced by ilMail\__construct(), ilSurveyRaterGUI\addRater(), ilOrgUnitUserAssignmentGUI\addStaff(), ilObjBlogGUI\addUserFromAutoComplete(), ilRepositorySearchGUI\addUserFromAutoComplete(), ilBookingParticipantGUI\addUserFromAutoCompleteObject(), ilExerciseManagementGUI\addUserFromAutoCompleteObject(), ilExSubmissionTeamGUI\addUserFromAutoCompleteObject(), ilTreeTrashQueries\appendTrashNodeForContainerQueryFilter(), ilSkillProfileGUI\assignUser(), ilOrgUnitSimpleUserImport\buildUserId(), ilChatroomInviteUsersToPrivateRoomGUI\byLogin(), ilPermissionGUI\changeOwner(), ilAuthProviderApache\doAuthentication(), ilAuthProviderShibboleth\doAuthentication(), ilLTIAppEventListener\doCronUpdate(), ilBenchmark\enableDbBenchmarkForUserName(), ilAuthProviderLTI\findUserId(), ilMail\formatNamesForOutput(), ILIAS\Survey\Evaluation\EvaluationManager\getSelectableAppraisees(), ILIAS\Survey\Settings\SettingsFormGUI\getTutorIdsFromForm(), ILIAS\Survey\Settings\SettingsFormGUI\getTutorResIdsFromForm(), ilObjectPermissionStatusGUI\getUser(), ilAccessibilitySupportContacts\getValidSupportContactIds(), ilSystemSupportContacts\getValidSupportContactIds(), ilDclStandardField\getValueFromExcel(), ilAuthProviderApache\handleLDAPDataSource(), ilAuthProviderECS\handleLogin(), ilAuthFrontend\handleLoginAttempts(), ilSessionControl\handleLoginEvent(), ilAuthProviderSaml\handleSamlAuth(), ilAuthProviderSoap\handleSoapAuth(), ilAuthProviderSaml\importUser(), ilSoapRBACAdministration\parseUserID(), ilStartUpGUI\processCode(), ilECSCmsCourseMemberCommandQueueHandler\refreshAssignmentStatus(), ilDclRecordEditGUI\save(), ilObjEmployeeTalkSeriesGUI\saveObject(), ilSingleUserShareGUI\saveShare(), ilObjSurvey\sent360Reminders(), ilRegistrationSettings\setApproveRecipientLogins(), ilOpenIdConnectUserSync\setInternalAccount(), ilSystemSupportContacts\setList(), ilAccessibilitySupportContacts\setList(), ilAuthProviderLDAP\updateAccount(), ilLDAPAttributeToUser\usersToXML(), ilRegistrationSettings\validate(), and ilUserImportParser\verifyEndTag().

+ Here is the caller graph for this function:

◆ _lookupLanguage()

static ilObjUser::_lookupLanguage ( int  $a_usr_id)
static

Definition at line 2649 of file class.ilObjUser.php.

2649 : string
2650 {
2651 global $DIC;
2652 $ilDB = $DIC['ilDB'];
2653 $lng = $DIC['lng'];
2654
2655 $q = 'SELECT value FROM usr_pref WHERE usr_id= ' .
2656 $ilDB->quote($a_usr_id, 'integer') . ' AND keyword = ' .
2657 $ilDB->quote('language', 'text');
2658 $r = $ilDB->query($q);
2659
2660 while ($row = $ilDB->fetchAssoc($r)) {
2661 return (string) $row['value'];
2662 }
2663 if (is_object($lng)) {
2664 return $lng->getDefaultLanguage();
2665 }
2666 return 'en';
2667 }
getDefaultLanguage()
Return default language.
ilLanguage $lng

References $DIC, $ilDB, $lng, and $q.

Referenced by ilLanguageFactory\_getLanguageOfUser().

+ Here is the caller graph for this function:

◆ _lookupLastLogin()

static ilObjUser::_lookupLastLogin ( int  $a_user_id)
static

Definition at line 2949 of file class.ilObjUser.php.

2949 : string
2950 {
2951 return self::_lookup($a_user_id, 'last_login') ?? '';
2952 }

Referenced by ilCronDeleteInactiveUserReminderMail\removeEntriesFromTableIfLastLoginIsNewer().

+ Here is the caller graph for this function:

◆ _lookupLogin()

static ilObjUser::_lookupLogin ( int  $a_user_id)
static

Definition at line 2729 of file class.ilObjUser.php.

2729 : string
2730 {
2731 return (string) self::_lookup($a_user_id, 'login') ?? '';
2732 }

Referenced by ilCourseXMLParser\__parseId(), ILIAS\Mail\Placeholder\MailSignatureUserLoginPlaceholder\addPlaceholder(), ilObjSystemFolderGUI\benchmarkObject(), ILIAS\Certificate\Overview\CertificateOverviewTable\buildTableRows(), ilContactGUI\chatroomInvitationMessage(), ilChatUserActionProvider\collectActionsForTargetUser(), ilWorkspaceUserActionProvider\collectActionsForTargetUser(), ilOrgUnitUserAssignmentGUI\confirmRemove(), ilObjRole\delete(), ilStartUpGUI\doStandardAuthentication(), ilObjSessionGUI\eventsListObject(), ilSessionOverviewGUI\exportCSV(), ilStudyProgrammeIndividualPlanTableGUI\fetchData(), ilDclBaseRecordModel\fillRecordFieldExcelExport(), ilPDNewsTableGUI\fillRow(), ilTestServiceGUI\getAdditionalUsrDataHtmlAndPopulateWindowTitle(), ilAccessibilitySupportContactsGUI\getContactLogins(), ILIAS\Container\Skills\ContSkillMemberRetrieval\getData(), ilAttendanceList\getHTML(), ILIAS\Test\ExportImport\CertificateExport\getLoginsForIds(), ilConsultationHourAppointments\getManagedUsers(), ilConsultationHourAppointments\getManager(), ilStudyProgrammeMailMemberSearchGUI\getProcessData(), ILIAS\Forum\Notification\ForumNotificationTable\getUserNotificationTableData(), ilInternalLinkGUI\getUserSearchResult(), ilUserClipboard\getValidatedContent(), ilAuthFrontend\handleAuthenticationSuccess(), ilMailSearchObjectGUI\mailMembers(), ilContactGUI\mailToUsers(), ilPermissionGUI\owner(), ilCalendarSharedUserListTableGUI\parse(), ilTrashTableGUI\parse(), ilUserClipboardTableGUI\parse(), ilRegistrationSettings\read(), ilLearningSequenceRoles\readMemberData(), ilExerciseManagementGUI\redirectFeedbackMailObject(), ilBookingReservationsGUI\redirectMailToBooker(), ilPortfolioRepositoryGUI\redirectSendMailToSharer(), ilBuddyList\request(), ilLearningModuleNotification\send(), ilMailSummaryNotification\send(), ilTimingsCronReminder\sendExceededMail(), ilTimingsCronReminder\sendFreshlyStartedMail(), ilMailNotification\sendMail(), ilLPTableBaseGUI\sendMail(), ilSkillNotifications\sendMail(), ilMembershipCronNotifications\sendMail(), ilObjContentObjectGUI\sendMailToBlockedUsers(), ilConsultationHoursGUI\sendMailToSelectedUsers(), ilMailMemberSearchGUI\sendMailToSelectedUsers(), ilMembershipGUI\sendMailToSelectedUsers(), ilMembershipMailGUI\sendMailToSelectedUsers(), ilStudyProgrammeMailMemberSearchGUI\sendMailToSelectedUsers(), ilMembershipCronMinMembers\sendMessage(), ilExAssignmentReminder\sendReminders(), ilObjSurvey\sendTutorNotification(), ilEmployeeTalkTableGUI\setTalkData(), ilMailSearchGUI\showResults(), ilMailFolderGUI\showUser(), ilContactGUI\submitInvitation(), ILIAS\LegalDocuments\Provide\ProvideHistory\table(), ilBuddySystemGUI\transitionAsyncCommand(), ilContactGUI\updateRelationState(), and ilUserImportParser\verifyEndTag().

+ Here is the caller graph for this function:

◆ _lookupName()

static ilObjUser::_lookupName ( int  $a_user_id)
static

Definition at line 2623 of file class.ilObjUser.php.

2623 : array
2624 {
2625 global $DIC;
2626 $ilDB = $DIC['ilDB'];
2627
2628 $res = $ilDB->queryF(
2629 'SELECT firstname, lastname, title, login FROM usr_data WHERE usr_id = %s',
2630 ['integer'],
2631 [$a_user_id]
2632 );
2633 if (($user_rec = $ilDB->fetchAssoc($res))) {
2634 return ['user_id' => $a_user_id,
2635 'firstname' => $user_rec['firstname'],
2636 'lastname' => $user_rec['lastname'],
2637 'title' => $user_rec['title'],
2638 'login' => $user_rec['login']
2639 ];
2640 }
2641 return ['user_id' => 0,
2642 'firstname' => '',
2643 'lastname' => '',
2644 'title' => '',
2645 'login' => ''
2646 ];
2647 }

References $DIC, $ilDB, and $res.

Referenced by ilBookingAssignObjectsTableGUI\__construct(), ilExGradesTableGUI\__construct(), ILIAS\WOPI\Handler\GetFileInfoResponse\__construct(), ilObjTestAccess\_getParticipantData(), ilSoapLearningProgressAdministration\addUserProgress(), ilTimingsCronReminder\buildMailSalutation(), ilMailUserActionProvider\collectActionsForTargetUser(), ilExerciseManagementCollectFilesJob\collectAssignmentData(), ilMembershipGUI\confirmAssignFromWaitingList(), ilMembershipGUI\confirmAssignSubscribers(), ilMembershipGUI\confirmDeleteParticipants(), ilSessionMembershipGUI\confirmDeleteParticipants(), ilMembershipGUI\confirmRefuseFromList(), ilMembershipGUI\confirmRefuseSubscribers(), ILIAS\Exercise\Submission\SubmissionManager\copySubmissionsToDir(), ilLocalUserGUI\deleteUsers(), ilObjCategoryGUI\deleteUsersObject(), ilPortfolioExerciseGUI\downloadExcSubFile(), ilWikiPageGUI\downloadExcSubFile(), ilObjSessionGUI\eventsListObject(), ilSessionOverviewGUI\exportCSV(), ilObjExercise\exportGradesExcel(), ilDclBaseRecordModel\fillRecordFieldExcelExport(), ilCalendarInboxSharedTableGUI\fillRow(), ilFileVersionsTableGUI\fillRow(), ilObjSurvey\getAppraiseesData(), ilLMTracker\getBlockedUsersInformation(), ILIAS\Container\Skills\ContSkillMemberRetrieval\getData(), ilExSubmission\getDirectoryNameFromUserData(), ILIAS\Exercise\Submission\SubmissionManager\getDirectoryNameFromUserData(), ILIAS\Exercise\TutorFeedbackFile\TutorFeedbackFileManager\getFeedbackTitle(), ILIAS\Exercise\TutorFeedbackFile\TutorFeedbackZipRepository\getFiles(), ilIndividualAssessmentMembersTableGUI\getFullNameFor(), ilAttendanceList\getHTML(), ilSessionOverviewTableGUI\getItems(), ilSurveyParticipantsTableGUI\getItems(), ILIAS\Test\Logging\TestLogViewer\getLegacyLogExportForObjId(), ilExAssignment\getMemberListData(), ILIAS\Portfolio\PortfolioPrintViewProviderGUI\getPages(), ilDownloadSubmissionsBackgroundTask\getParticipantBucketTitle(), ilStudyProgrammeMailMemberSearchGUI\getProcessData(), ilObjWikiListGUI\getProperties(), ILIAS\AccessControl\Log\Table\getRows(), ilMail\getSalutation(), ilDclBaseRecordModel\getStandardField(), ILIAS\Forum\Notification\ForumNotificationTable\getUserNotificationTableData(), ilObjStudyProgrammeAutoCategoriesGUI\getUserRepresentation(), ilObjStudyProgrammeAutoMembershipsGUI\getUserRepresentation(), ilWorkspaceShareTableGUI\importData(), ilCourseParticipantsGroupsTableDataRetrieval\init(), ilLOMemberTestResultTableGUI\init(), ilContSkillAdminGUI\initCompetenceAssignmentForm(), ilWorkspaceShareTableGUI\initFilter(), ilExerciseManagementGUI\initIndividualDeadlineForm(), ilObjectCustomUserFieldsGUI\initMemberForm(), ilAssignmentsPerParticipantTableGUI\initMode(), ilCourseParticipantsTableGUI\lookupUserName(), ilGroupParticipantsTableGUI\lookupUserName(), ilCalendarSharedListTableGUI\parse(), ilCalendarSharedUserListTableGUI\parse(), ilConsultationHoursTableGUI\parse(), ilCourseReferenceDeleteConfirmationTableGUI\parse(), ilUserClipboardTableGUI\parse(), ilGroupXMLParser\parseId(), ilObjCourseGUI\readMemberData(), ilLearningSequenceRoles\readMemberData(), ilSubscriberTableGUI\readSubscriberData(), ilWaitingListTableGUI\readUserData(), ILIAS\Test\Scoring\Manual\TestScoringByParticipantGUI\saveManScoringParticipantScreen(), ilExerciseManagementGUI\showParticipantObject(), ilMailSearchGUI\showResults(), ilCourseContentGUI\showUserTimings(), ilObjTest\userLookupFullName(), and ilMailNotification\userToString().

+ Here is the caller graph for this function:

◆ _lookupPref()

static ilObjUser::_lookupPref ( int  $a_usr_id,
string  $a_keyword 
)
static

Definition at line 2469 of file class.ilObjUser.php.

2472 : ?string {
2473 global $DIC;
2474 $ilDB = $DIC['ilDB'];
2475
2476 $query = 'SELECT * FROM usr_pref WHERE usr_id = ' . $ilDB->quote($a_usr_id, 'integer') . ' ' .
2477 'AND keyword = ' . $ilDB->quote($a_keyword, 'text');
2478 $res = $ilDB->query($query);
2479
2480 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
2481 return $row->value;
2482 }
2483 return null;
2484 }

Referenced by ilChatUserActionProvider\acceptsMessages(), ilChatroomViewGUI\buildUserActions(), ilObjUserAccess\canBeDelivered(), ilUserUserActionProvider\collectActionsForTargetUser(), ilMailSearchObjectMembershipsTableGUI\fillRow(), ilMail\formatNamesForOutput(), ilSessionReminder\getEffectiveLeadTime(), ilBuddySystemLinkButton\getHtml(), ilUserUtil\getProfileLink(), ilTutorialSupportBlockGUI\hasContactEnabled(), ilBuddySystemGUI\requestCommand(), ilMailSearchGUI\showResults(), ilBuddySystemGUI\transitionAsyncCommand(), and ilContactGUI\updateRelationState().

+ Here is the caller graph for this function:

◆ _moveUsersToStyle()

static ilObjUser::_moveUsersToStyle ( string  $a_from_skin,
string  $a_from_style,
string  $a_to_skin,
string  $a_to_style 
)
static

Definition at line 3082 of file class.ilObjUser.php.

3087 : void {
3088 global $DIC;
3089 $ilDB = $DIC['ilDB'];
3090
3091 $q = 'SELECT up1.usr_id usr_id FROM usr_pref up1, usr_pref up2 ' .
3092 ' WHERE up1.keyword= ' . $ilDB->quote('style', 'text') .
3093 ' AND up1.value= ' . $ilDB->quote($a_from_style, 'text') .
3094 ' AND up2.keyword= ' . $ilDB->quote('skin', 'text') .
3095 ' AND up2.value= ' . $ilDB->quote($a_from_skin, 'text') .
3096 ' AND up1.usr_id = up2.usr_id ';
3097
3098 $usr_set = $ilDB->query($q);
3099
3100 while ($usr_rec = $ilDB->fetchAssoc($usr_set)) {
3101 $ilDB->replace(
3102 'usr_pref',
3103 [
3104 'usr_id' => [ilDBConstants::T_INTEGER, $usr_rec['usr_id']],
3105 'keyword' => [ilDBConstants::T_TEXT, 'skin'],
3106 ],
3107 [
3108 'value' => [ilDBConstants::T_TEXT, $a_to_skin]
3109 ]
3110 );
3111 $ilDB->replace(
3112 'usr_pref',
3113 [
3114 'usr_id' => [ilDBConstants::T_INTEGER, $usr_rec['usr_id']],
3115 'keyword' => [ilDBConstants::T_TEXT, 'style'],
3116 ],
3117 [
3118 'value' => [ilDBConstants::T_TEXT, $a_to_style]
3119 ]
3120 );
3121 }
3122 }

References $ilDB, ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.

Referenced by ilSystemStyleOverviewGUI\moveUserStyles().

+ Here is the caller graph for this function:

◆ _readUsersProfileData()

static ilObjUser::_readUsersProfileData ( array  $a_user_ids)
static

Definition at line 2977 of file class.ilObjUser.php.

2977 : array
2978 {
2979 global $DIC;
2980 $ilDB = $DIC['ilDB'];
2981
2982 $res = $ilDB->query('SELECT * FROM usr_data WHERE ' .
2983 $ilDB->in('usr_id', $a_user_ids, false, 'integer'));
2984 $user_data = [];
2985 while ($row = $ilDB->fetchAssoc($res)) {
2986 $user_data[$row['usr_id']] = $row;
2987 }
2988 return $user_data;
2989 }

References $DIC, $ilDB, and $res.

Referenced by ilMemberExport\fetchUsers(), ilAttendanceList\getNonMemberUserData(), ilCourseMembershipGUI\getPrintMemberData(), ilObjGroupGUI\readMemberData(), and ilLearningSequenceRoles\readMemberData().

+ Here is the caller graph for this function:

◆ _setUserInactive()

static ilObjUser::_setUserInactive ( int  $a_usr_id)
static

Definition at line 2209 of file class.ilObjUser.php.

2211 : bool {
2212 global $DIC;
2213 $ilDB = $DIC['ilDB'];
2214
2215 $query = 'UPDATE usr_data SET active = 0, inactivation_date = %s WHERE usr_id = %s';
2216 $affected = $ilDB->manipulateF($query, ['timestamp', 'integer'], [ilUtil::now(), $a_usr_id]);
2217
2218 if ($affected) {
2219 return true;
2220 } else {
2221 return false;
2222 }
2223 }
static now()
Return current timestamp in Y-m-d H:i:s format.

Referenced by ilAuthFrontend\handleLoginAttempts().

+ Here is the caller graph for this function:

◆ _toggleActiveStatusOfUsers()

static ilObjUser::_toggleActiveStatusOfUsers ( array  $a_usr_ids,
bool  $a_status 
)
static

Definition at line 2776 of file class.ilObjUser.php.

2779 : void {
2780 global $DIC;
2781
2782 $ilDB = $DIC['ilDB'];
2783
2784 if ($a_status) {
2785 $q = 'UPDATE usr_data SET active = 1, inactivation_date = NULL WHERE ' .
2786 $ilDB->in('usr_id', $a_usr_ids, false, 'integer');
2787 $ilDB->manipulate($q);
2788 } else {
2789 $usrId_IN_usrIds = $ilDB->in('usr_id', $a_usr_ids, false, 'integer');
2790
2791 $q = 'UPDATE usr_data SET active = 0 WHERE $usrId_IN_usrIds';
2792 $ilDB->manipulate($q);
2793
2794 $queryString = '
2795 UPDATE usr_data
2796 SET inactivation_date = %s
2797 WHERE inactivation_date IS NULL
2798 AND $usrId_IN_usrIds
2799 ';
2800 $ilDB->manipulateF($queryString, ['timestamp'], [ilUtil::now()]);
2801 }
2802 }

References $ilDB, and $q.

Referenced by ilLDAPCronSynchronization\deactivateUsers().

+ Here is the caller graph for this function:

◆ _verifyRegistrationHash()

static ilObjUser::_verifyRegistrationHash ( string  $a_hash)
static

Definition at line 2295 of file class.ilObjUser.php.

2297 : int {
2298 global $DIC;
2299 $db = $DIC['ilDB'];
2300
2301 $res = $db->queryf(
2302 'SELECT usr_id, create_date FROM usr_data WHERE reg_hash = %s',
2304 [$a_hash]
2305 );
2306
2307 $row = $db->fetchAssoc($res);
2308 if (!$row) {
2309 throw new ilRegistrationHashNotFoundException('reg_confirmation_hash_not_found');
2310 }
2311
2312 $lifetime = (new ilRegistrationSettings())->getRegistrationHashLifetime();
2313 if ($lifetime > 0) {
2314 $cutoff = (new DataFactory())->clock()->utc()
2315 ->now()->sub(
2316 new DateInterval("PT{$lifetime}S")
2317 );
2318
2319 $created = DateTimeImmutable::createFromFormat(
2320 self::DATABASE_DATE_FORMAT,
2321 (string) $row['create_date'],
2322 new DateTimeZone('UTC')
2323 );
2324
2325 if ($created === false || $created < $cutoff) {
2327 'reg_confirmation_hash_life_time_expired',
2328 (int) $row['usr_id']
2329 );
2330 }
2331 }
2332
2334 'UPDATE usr_data SET reg_hash = NULL WHERE usr_id = %s',
2336 [(int) $row['usr_id']]
2337 );
2338
2339 return (int) $row['usr_id'];
2340 }
Class for user related exception handling in ILIAS.
Class for user related exception handling in ILIAS.
Class ilObjAuthSettingsGUI.
manipulateF(string $query, array $types, array $values)

◆ _writeAuthMode()

static ilObjUser::_writeAuthMode ( int  $a_usr_id,
string  $a_auth_mode 
)
static

Definition at line 2684 of file class.ilObjUser.php.

2684 : void
2685 {
2686 global $DIC;
2687 $ilDB = $DIC['ilDB'];
2688
2689 $ilDB->manipulateF(
2690 'UPDATE usr_data ' .
2691 ' SET auth_mode = %s WHERE usr_id = %s',
2692 ['text', 'integer'],
2693 [$a_auth_mode, $a_usr_id]
2694 );
2695 }

References $DIC, and $ilDB.

Referenced by ilAuthProviderSaml\handleSamlAuth().

+ Here is the caller graph for this function:

◆ _writeExternalAccount()

static ilObjUser::_writeExternalAccount ( int  $a_usr_id,
string  $a_ext_id 
)
static

Definition at line 2669 of file class.ilObjUser.php.

2672 : void {
2673 global $DIC;
2674 $ilDB = $DIC['ilDB'];
2675
2676 $ilDB->manipulateF(
2677 'UPDATE usr_data ' .
2678 ' SET ext_account = %s WHERE usr_id = %s',
2679 ['text', 'integer'],
2680 [$a_ext_id, $a_usr_id]
2681 );
2682 }

◆ activateDeletionFlag()

ilObjUser::activateDeletionFlag ( )

Definition at line 1761 of file class.ilObjUser.php.

1761 : void
1762 {
1763 $this->writePref('delete_flag', true);
1764 }
writePref(string $keyword, string $value)

◆ addObjectToClipboard()

ilObjUser::addObjectToClipboard ( int  $a_item_id,
string  $a_type,
string  $a_title,
int  $a_parent = 0,
string  $a_time = '',
int  $a_order_nr = 0 
)

add an item to user's personal clipboard

Parameters
int$a_item_idref_id for objects, that are in the main tree (learning modules, forums) obj_id for others
string$a_typeobject type

Definition at line 1241 of file class.ilObjUser.php.

1248 : void {
1249 global $DIC;
1250
1251 $ilDB = $DIC['ilDB'];
1252
1253 if ($a_time === '') {
1254 $a_time = date('Y-m-d H:i:s');
1255 }
1256
1257 $item_set = $ilDB->queryF(
1258 'SELECT * FROM personal_clipboard WHERE ' .
1259 'parent = %s AND item_id = %s AND type = %s AND user_id = %s',
1260 ['integer', 'integer', 'text', 'integer'],
1261 [0, $a_item_id, $a_type, $this->getId()]
1262 );
1263
1264 // only insert if item is not already in clipboard
1265 if (!$item_set->fetchRow()) {
1266 $ilDB->manipulateF(
1267 'INSERT INTO personal_clipboard ' .
1268 '(item_id, type, user_id, title, parent, insert_time, order_nr) VALUES ' .
1269 ' (%s,%s,%s,%s,%s,%s,%s)',
1270 ['integer', 'text', 'integer', 'text', 'integer', 'timestamp', 'integer'],
1271 [$a_item_id, $a_type, $this->getId(), $a_title, $a_parent, $a_time, $a_order_nr]
1272 );
1273 } else {
1274 $ilDB->manipulateF(
1275 'UPDATE personal_clipboard SET insert_time = %s ' .
1276 'WHERE user_id = %s AND item_id = %s AND type = %s AND parent = 0',
1277 ['timestamp', 'integer', 'integer', 'text'],
1278 [$a_time, $this->getId(), $a_item_id, $a_type]
1279 );
1280 }
1281 }

Referenced by ilPageEditorGUI\copyLinkedMediaToClipboard().

+ Here is the caller graph for this function:

◆ addToPCClipboard()

ilObjUser::addToPCClipboard ( string  $a_content,
string  $a_time,
int  $a_nr 
)

Add a page content item to PC clipboard (should go to another class)

Todo:
move to COPage service

Definition at line 1287 of file class.ilObjUser.php.

1291 : void {
1292 $ilDB = $this->db;
1293 if ($a_time == 0) {
1294 $a_time = date('Y-m-d H:i:s');
1295 }
1296 ilSession::set('user_pc_clip', true);
1297 $ilDB->insert('personal_pc_clipboard', [
1298 'user_id' => ['integer', $this->getId()],
1299 'content' => ['clob', $a_content],
1300 'insert_time' => ['timestamp', $a_time],
1301 'order_nr' => ['integer', $a_nr]
1302 ]);
1303 }
static set(string $a_var, $a_val)
Set a value.

◆ assignSystemInformationFromDB()

ilObjUser::assignSystemInformationFromDB ( array  $data)
private

Definition at line 202 of file class.ilObjUser.php.

202 : void
203 {
204 if (!empty($data['passwd'])) {
205 $this->setPasswd($data['passwd'], self::PASSWD_CRYPTED);
206 }
207
208 $this->password_salt = $data['passwd_salt'];
209 $this->password_encoding_type = $data['passwd_enc_type'];
210 $this->last_password_change_ts = $data['last_password_change'];
211 $this->login_attempts = $data['login_attempts'];
212 $this->passwd_policy_reset = $data['passwd_policy_reset'];
213 $this->client_ip = $data['client_ip'];
214 $this->last_login = $data['last_login'];
215 $this->first_login = $data['first_login'];
216 $this->last_profile_prompt = $data['last_profile_prompt'];
217 $this->last_update = $data['last_update'];
218 $this->create_date = $data['create_date'];
219 $this->approve_date = $data['approve_date'];
220 $this->active = $data['active'];
221 $this->agree_date = $data['agree_date'];
222 $this->inactivation_date = $data['inactivation_date'];
223
224 $this->time_limit_owner = $data['time_limit_owner'];
225 $this->time_limit_unlimited = $data['time_limit_unlimited'];
226 $this->time_limit_from = $data['time_limit_from'];
227 $this->time_limit_until = $data['time_limit_until'];
228
229 $this->profile_incomplete = $data['profile_incomplete'];
230
231 $this->auth_mode = $data['auth_mode'];
232 $this->ext_account = $data['ext_account'] ?? '';
233 $this->is_self_registered = $data['is_self_registered'];
234 }
setPasswd(string $a_str, string $a_type=ilObjUser::PASSWD_PLAIN)

References $data, and setPasswd().

Referenced by read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildSystemInformationArrayForDB()

ilObjUser::buildSystemInformationArrayForDB ( )
private

Definition at line 236 of file class.ilObjUser.php.

236 : array
237 {
238 return [
239 'last_password_change' => $this->last_password_change_ts,
240 'login_attempts' => $this->login_attempts,
241 'passwd' => $this->prepareAndRetrievePasswordForStorage(),
242 'passwd_salt' => $this->password_salt,
243 'passwd_enc_type' => $this->password_encoding_type,
244 'passwd_policy_reset' => $this->passwd_policy_reset,
245 'client_ip' => $this->client_ip,
246 'last_login' => $this->last_login,
247 'first_login' => $this->first_login,
248 'last_profile_prompt' => $this->last_profile_prompt,
249 'active' => $this->active,
250 'approve_date' => $this->approve_date,
251 'agree_date' => $this->retrieveAgreeDateForStorage(),
252 'inactivation_date' => $this->inactivation_date,
253 'time_limit_owner' => $this->time_limit_owner,
254 'time_limit_unlimited' => $this->time_limit_unlimited,
255 'time_limit_from' => $this->time_limit_from,
256 'time_limit_until' => $this->time_limit_until,
257 'profile_incomplete' => $this->profile_incomplete,
258 'auth_mode' => $this->auth_mode,
259 'ext_account' => $this->ext_account ?? '',
260 'is_self_registered' => $this->is_self_registered,
261 'last_update' => $this->last_update,
262 'create_date' => $this->create_date,
263 ];
264 }
string $last_login
string $client_ip
string $password_encoding_type
prepareAndRetrievePasswordForStorage()
bool $is_self_registered
string $inactivation_date
bool $time_limit_unlimited
bool $passwd_policy_reset
int $time_limit_from
int $last_password_change_ts
string $first_login
string $approve_date
int $time_limit_until
string $password_salt
retrieveAgreeDateForStorage()
int $time_limit_owner
string $last_profile_prompt
string $auth_mode
bool $profile_incomplete
string $create_date
string $last_update

References $active, $approve_date, $auth_mode, $client_ip, ilObject\$create_date, $first_login, $inactivation_date, $is_self_registered, $last_login, $last_password_change_ts, $last_profile_prompt, ilObject\$last_update, $login_attempts, $passwd_policy_reset, $password_encoding_type, $password_salt, $profile_incomplete, $time_limit_from, $time_limit_owner, $time_limit_unlimited, $time_limit_until, prepareAndRetrievePasswordForStorage(), and retrieveAgreeDateForStorage().

Referenced by saveAsNew().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildTextFromArray()

ilObjUser::buildTextFromArray ( array  $a_attr)
private

Definition at line 1922 of file class.ilObjUser.php.

1922 : string
1923 {
1924 if (count($a_attr) > 0) {
1925 return implode(', ', $a_attr);
1926 }
1927 return '';
1928 }

◆ checkTimeLimit()

ilObjUser::checkTimeLimit ( )

Definition at line 1131 of file class.ilObjUser.php.

1131 : bool
1132 {
1133 if ($this->getTimeLimitUnlimited()) {
1134 return true;
1135 }
1136 if ($this->getTimeLimitFrom() < time() and $this->getTimeLimitUntil() > time()) {
1137 return true;
1138 }
1139 return false;
1140 }

Referenced by ilAuthFrontend\checkTimeLimit(), and ilAccountMail\send().

+ Here is the caller graph for this function:

◆ clipboardDeleteAll()

ilObjUser::clipboardDeleteAll ( )

Definition at line 1369 of file class.ilObjUser.php.

1369 : void
1370 {
1371 global $DIC;
1372
1373 $ilDB = $DIC['ilDB'];
1374
1375 $ilDB->manipulateF('DELETE FROM personal_clipboard WHERE ' .
1376 'user_id = %s', ['integer'], [$this->getId()]);
1377 }

References $DIC, $ilDB, and ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ clipboardDeleteObjectsOfType()

ilObjUser::clipboardDeleteObjectsOfType ( string  $a_type)

Definition at line 1357 of file class.ilObjUser.php.

1357 : void
1358 {
1359 $ilDB = $this->db;
1360
1361 $ilDB->manipulateF(
1362 'DELETE FROM personal_clipboard WHERE ' .
1363 'type = %s AND user_id = %s',
1364 ['text', 'integer'],
1365 [$a_type, $this->getId()]
1366 );
1367 }

References $ilDB, and ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ clipboardHasObjectsOfType()

ilObjUser::clipboardHasObjectsOfType ( string  $a_type)

Check whether clipboard has objects of a certain type.

Definition at line 1338 of file class.ilObjUser.php.

1338 : bool
1339 {
1340 global $DIC;
1341
1342 $ilDB = $DIC['ilDB'];
1343
1344 $set = $ilDB->queryF(
1345 'SELECT * FROM personal_clipboard WHERE ' .
1346 'parent = %s AND type = %s AND user_id = %s',
1347 ['integer', 'text', 'integer'],
1348 [0, $a_type, $this->getId()]
1349 );
1350 if ($ilDB->fetchAssoc($set)) {
1351 return true;
1352 }
1353
1354 return false;
1355 }

References $DIC, $ilDB, and ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ copyProfilePicturesToDirectory()

static ilObjUser::copyProfilePicturesToDirectory ( int  $a_user_id,
string  $a_dir 
)
static

Definition at line 3184 of file class.ilObjUser.php.

3187 : void {
3188 global $DIC;
3189 $irss = $DIC->resourceStorage();
3190
3191 $clean_dir = trim(str_replace('..', '', $a_dir));
3192 if ($clean_dir == '' || !is_dir($clean_dir)) {
3193 return;
3194 }
3195 $avatar_rid = (new ilObjUser($a_user_id))->getAvatarRid();
3196 if ($avatar_rid === null) {
3197 return;
3198 }
3199
3200 file_put_contents(
3201 $clean_dir . '/usr_' . $a_user_id . '.jpg',
3202 $irss->consume()->stream($avatar_rid)->getStream()->getContents()
3203 );
3204 }
User class.
Services $irss

Referenced by ilUserDataSet\getXmlRecord().

+ Here is the caller graph for this function:

◆ delete()

ilObjUser::delete ( )

delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!!

Returns
bool true if object was removed completely; false if only a references was removed

Reimplemented from ilObject.

Definition at line 500 of file class.ilObjUser.php.

500 : bool
501 {
502 $this->app_event_handler->raise(
503 'Services/User',
504 'deleteUser',
505 ['usr_id' => $this->getId()]
506 );
507
509 ilLDAPRoleGroupMapping::_getInstance()->deleteUser($this->getId());
510 $this->rbac_admin->removeUser($this->getId());
511 (ilOrgUnitUserAssignmentQueries::getInstance())->deleteAllAssignmentsOfUser($this->getId());
512
513 $mailbox = new ilMailbox($this->getId());
514 $mailbox->delete();
515 $mailbox->updateMailsOfDeletedUser($this->getLogin());
516
525 (new ilWorkspaceTree($this->id))->cascadingDelete();
526 $this->cron_delete_user_reminder_mail->removeSingleUserFromTable($this->getId());
528 $this->clipboardDeleteAll();
529
530 $this->deleteAllPrefs();
531 $this->removeUserPicture();
532 $this->profile_data_repository->deleteForUser($this->getId());
533
534 $this->resetOwner();
535 parent::delete();
536
537 return true;
538 }
static deleteByUserId(int $a_user_id)
static _deleteSettingsOfUser(int $a_user)
static _deleteByUser(int $a_usr_id)
static _getInstance()
Get singleton instance of this class.
static removeForUser(int $user_id)
Remove all notifications for given user.
static _deleteUser(int $a_usr_id)
static deleteUserPortfolios(int $a_user_id)
Delete all portfolio data for user.
static _removeTrackingDataForUser(int $user_id)
to be called from IlObjUser
static _deleteUser(int $a_usr_id)
static _removeTrackingDataForUser(int $user_id)
static _destroyByUserId(int $a_user_id)
Destroy session.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilEventParticipants\_deleteByUser(), ilBlockSetting\_deleteSettingsOfUser(), ilObjCourse\_deleteUser(), ilObjUserTracking\_deleteUser(), ilSession\_destroyByUserId(), ilLDAPRoleGroupMapping\_getInstance(), ilSCORM13Package\_removeTrackingDataForUser(), ilObjSCORMLearningModule\_removeTrackingDataForUser(), ilBadgeAssignment\deleteByUserId(), ilObjPortfolio\deleteUserPortfolios(), ILIAS\Survey\Mode\getId(), ilOrgUnitUserAssignmentQueries\getInstance(), and ilNotification\removeForUser().

+ Here is the call graph for this function:

◆ deleteAllPrefs()

ilObjUser::deleteAllPrefs ( )
private

Definition at line 409 of file class.ilObjUser.php.

409 : void
410 {
411 $this->db->manipulateF(
412 'DELETE FROM usr_pref WHERE usr_id = %s',
413 ['integer'],
414 [$this->id]
415 );
416 }

◆ deletePref()

ilObjUser::deletePref ( string  $keyword)

Definition at line 399 of file class.ilObjUser.php.

399 : void
400 {
401 $this->db->manipulateF(
402 'DELETE FROM usr_pref WHERE usr_id = %s AND keyword = %s',
403 ['integer', 'text'],
404 [$this->id, $keyword]
405 );
406 unset($this->prefs[$keyword]);
407 }

Referenced by ILIAS\Awareness\UserSettings\ShowStatusInWhoIsOnline\persistUserInput(), ILIAS\Chatroom\UserSettings\AllowOnScreenChatConversations\persistUserInput(), ILIAS\Chatroom\UserSettings\BroadcastTyping\persistUserInput(), ILIAS\Contact\UserSettings\AllowContactRequest\persistUserInput(), and ILIAS\User\Settings\StartingPoint\Repository\setPersonalStartingPointForUser().

+ Here is the caller graph for this function:

◆ findInterests()

static ilObjUser::findInterests ( string  $a_term,
?int  $a_user_id = null,
?string  $a_field_id = null 
)
static

Definition at line 2498 of file class.ilObjUser.php.

2502 : array {
2503 global $DIC;
2504 $ilDB = $DIC['ilDB'];
2505
2506 $res = [];
2507
2508 $sql = 'SELECT DISTINCT(value)' .
2509 ' FROM usr_profile_data' .
2510 ' WHERE ' . $ilDB->like('value', 'text', '%' . $a_term . '%');
2511 if ($a_field_id) {
2512 $sql .= ' AND field_id = ' . $ilDB->quote($a_field_id, 'text');
2513 }
2514 if ($a_user_id) {
2515 $sql .= ' AND usr_id <> ' . $ilDB->quote($a_user_id, 'integer');
2516 }
2517 $sql .= ' ORDER BY value';
2518 $set = $ilDB->query($sql);
2519 while ($row = $ilDB->fetchAssoc($set)) {
2520 $res[] = $row['value'];
2521 }
2522
2523 return $res;
2524 }

References $ilDB.

Referenced by ILIAS\User\Profile\PublicProfileGUI\doProfileAutoComplete().

+ Here is the caller graph for this function:

◆ generateRegistrationHash()

ilObjUser::generateRegistrationHash ( )

Definition at line 1893 of file class.ilObjUser.php.

1893 : string
1894 {
1895 do {
1896 $hashcode = substr(md5(uniqid(mt_rand(), true)), 0, 16);
1897
1898 $res = $this->db->queryf(
1899 'SELECT COUNT(usr_id) cnt FROM usr_data WHERE reg_hash = %s',
1901 [$hashcode]
1902 );
1903 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1904 if ($row->cnt > 0) {
1905 continue 2;
1906 }
1907 break;
1908 }
1909
1910 $this->db->manipulateF(
1911 'UPDATE usr_data SET reg_hash = %s WHERE usr_id = %s',
1913 [$hashcode, $this->id]
1914 );
1915 break;
1916 } while (true);
1917
1918 return $hashcode;
1919 }

References $res, ilDBConstants\FETCHMODE_OBJECT, ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.

◆ getActive()

ilObjUser::getActive ( )

Definition at line 1071 of file class.ilObjUser.php.

1071 : bool
1072 {
1073 return $this->active === 1;
1074 }

Referenced by ilAuthFrontend\checkActivation(), and ilAuthFrontend\checkExceededLoginAttempts().

+ Here is the caller graph for this function:

◆ getAgreeDate()

ilObjUser::getAgreeDate ( )

Definition at line 1035 of file class.ilObjUser.php.

1035 : ?string
1036 {
1037 return $this->agree_date;
1038 }
string $agree_date

◆ getApproveDate()

ilObjUser::getApproveDate ( )

Definition at line 1030 of file class.ilObjUser.php.

1030 : ?string
1031 {
1032 return $this->approve_date;
1033 }

◆ getAuthMode()

ilObjUser::getAuthMode ( bool  $a_auth_key = false)

Definition at line 1217 of file class.ilObjUser.php.

1217 : ?string
1218 {
1219 if (!$a_auth_key) {
1220 return $this->auth_mode;
1221 }
1222 return ilAuthUtils::_getAuthMode($this->auth_mode);
1223 }
static _getAuthMode(?string $a_auth_mode)

References ilAuthUtils\_getAuthMode().

Referenced by ILIAS\Authentication\Password\LocalUserPasswordManager\allowPasswordChange(), and ilECSAppEventListener\handleMembership().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAvatar()

ilObjUser::getAvatar ( )

Definition at line 1494 of file class.ilObjUser.php.

1494 : Avatar
1495 {
1496 return self::_getAvatar($this->getId());
1497 }
static _getAvatar(int $a_usr_id)

References ILIAS\Survey\Mode\getId().

Referenced by ilPDMailBlockGUI\getListItemForData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAvatarRid()

ilObjUser::getAvatarRid ( )

Definition at line 811 of file class.ilObjUser.php.

812 {
813 return $this->profile_data->getAvatarRid();
814 }

◆ getBirthday()

ilObjUser::getBirthday ( )

Definition at line 620 of file class.ilObjUser.php.

620 : ?string
621 {
622 return $this->profile_data->getBirthday()?->format('Y-m-d');
623 }

Referenced by ILIAS\User\Profile\Fields\Standard\Birthday\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getCity()

ilObjUser::getCity ( )

Definition at line 660 of file class.ilObjUser.php.

660 : string
661 {
662 return $this->profile_data->getCity();
663 }

Referenced by ILIAS\User\Profile\Fields\Standard\City\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getClientIP()

ilObjUser::getClientIP ( )

Definition at line 826 of file class.ilObjUser.php.

826 : string
827 {
828 return $this->client_ip;
829 }

Referenced by ilAuthFrontend\checkIp().

+ Here is the caller graph for this function:

◆ getClipboardChilds()

ilObjUser::getClipboardChilds ( int  $a_parent,
string  $a_insert_time 
)

Get children of an item.

Definition at line 1427 of file class.ilObjUser.php.

1430 : array {
1431 global $DIC;
1432
1433 $ilDB = $DIC['ilDB'];
1434 $ilUser = $DIC['ilUser'];
1435
1436 $objs = $ilDB->queryF(
1437 'SELECT * FROM personal_clipboard WHERE ' .
1438 'user_id = %s AND parent = %s AND insert_time = %s ' .
1439 ' ORDER BY order_nr',
1440 ['integer', 'integer', 'timestamp'],
1441 [$ilUser->getId(), $a_parent, $a_insert_time]
1442 );
1443 $objects = [];
1444 while ($obj = $ilDB->fetchAssoc($objs)) {
1445 if ($obj['type'] == 'mob') {
1446 $obj['title'] = ilObject::_lookupTitle($obj['item_id']);
1447 }
1448 $objects[] = ['id' => $obj['item_id'],
1449 'type' => $obj['type'], 'title' => $obj['title'], 'insert_time' => $obj['insert_time']];
1450 }
1451 return $objects;
1452 }
static _lookupTitle(int $obj_id)

References ilObject\_lookupTitle().

+ Here is the call graph for this function:

◆ getClipboardObjects()

ilObjUser::getClipboardObjects ( string  $a_type = '',
bool  $a_top_nodes_only = false 
)

get all clipboard objects of user and specified type

Definition at line 1382 of file class.ilObjUser.php.

1385 : array {
1386 global $DIC;
1387
1388 $ilDB = $DIC['ilDB'];
1389
1390 $par = '';
1391 if ($a_top_nodes_only) {
1392 $par = ' AND parent = ' . $ilDB->quote(0, 'integer') . ' ';
1393 }
1394
1395 $type_str = ($a_type != '')
1396 ? ' AND type = ' . $ilDB->quote($a_type, 'text') . ' '
1397 : '';
1398 $q = 'SELECT * FROM personal_clipboard WHERE ' .
1399 'user_id = ' . $ilDB->quote($this->getId(), 'integer') . ' ' .
1400 $type_str . $par .
1401 ' ORDER BY order_nr';
1402 $objs = $ilDB->query($q);
1403 $objects = [];
1404 while ($obj = $ilDB->fetchAssoc($objs)) {
1405 if ($obj['type'] == 'mob') {
1406 $obj['title'] = ilObject::_lookupTitle($obj['item_id']);
1407 if (ilObject::_lookupType((int) $obj['item_id']) !== 'mob') {
1408 continue;
1409 }
1410 }
1411 if ($obj['type'] == 'incl') {
1412 $obj['title'] = ilMediaPoolPage::lookupTitle($obj['item_id']);
1413 if (!ilPageObject::_exists('mep', (int) $obj['item_id'], '-')) {
1414 continue;
1415 }
1416 }
1417 $objects[] = ['id' => $obj['item_id'],
1418 'type' => $obj['type'], 'title' => $obj['title'],
1419 'insert_time' => $obj['insert_time']];
1420 }
1421 return $objects;
1422 }
static lookupTitle(int $a_page_id)
static _lookupType(int $id, bool $reference=false)
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.

References $ilDB.

Referenced by ilClipboardTableGUI\getItems().

+ Here is the caller graph for this function:

◆ getComment()

ilObjUser::getComment ( )

Definition at line 770 of file class.ilObjUser.php.

770 : string
771 {
772 return $this->profile_data->getReferralComment();
773 }

Referenced by ILIAS\User\Profile\Fields\Standard\ReferralComment\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getCountry()

ilObjUser::getCountry ( )

Definition at line 680 of file class.ilObjUser.php.

680 : string
681 {
682 return $this->profile_data->getCountry();
683 }

Referenced by ILIAS\LegalDocuments\Condition\UserCountry\eval(), and ILIAS\User\Profile\Fields\Standard\Country\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getCurrentLanguage()

ilObjUser::getCurrentLanguage ( )

returns the current language (may differ from user's pref setting!)

Definition at line 953 of file class.ilObjUser.php.

953 : string
954 {
955 return ilSession::get('lang') ?? '';
956 }
static get(string $a_var)

References ilSession\get().

+ Here is the call graph for this function:

◆ getDateFormat()

ilObjUser::getDateFormat ( )

Definition at line 444 of file class.ilObjUser.php.

444 : DateFormat
445 {
446 $format = $this->getPref('date_format');
447 if ($format === null) {
448 $format = ilCalendarSettings::_getInstance()->getDefaultDateFormat();
449 }
450
451 return match ((int) $format) {
452 ilCalendarSettings::DATE_FORMAT_DMY => $this->data_factory->dateFormat()->germanShort(),
453 ilCalendarSettings::DATE_FORMAT_MDY => $this->data_factory->dateFormat()->americanShort(),
454 ilCalendarSettings::DATE_FORMAT_YMD => $this->data_factory->dateFormat()->standard(),
455 default => $this->data_factory->dateFormat()->standard()
456 };
457 }
A Date Format provides a format definition akin to PHP's date formatting options, but stores the sing...
Definition: DateFormat.php:27
getPref(string $a_keyword)

References ilCalendarSettings\_getInstance(), ilCalendarSettings\DATE_FORMAT_DMY, ilCalendarSettings\DATE_FORMAT_MDY, and ilCalendarSettings\DATE_FORMAT_YMD.

Referenced by ilIndividualAssessmentDateFormatter\getUserDateFormat(), and ilDclDateSelectionFieldModel\personalizeOptionValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDateTimeFormat()

ilObjUser::getDateTimeFormat ( )

Definition at line 459 of file class.ilObjUser.php.

459 : DateFormat
460 {
461 if ($this->getTimeFormat() === (string) \ilCalendarSettings::TIME_FORMAT_24) {
462 return $this->data_factory->dateFormat()->withTime24($this->getDateFormat());
463 }
464 return $this->data_factory->dateFormat()->withTime12($this->getDateFormat());
465 }

References ilCalendarSettings\TIME_FORMAT_24.

Referenced by ilDclDatetimeSelectionFieldModel\personalizeOptionValue().

+ Here is the caller graph for this function:

◆ getDepartment()

ilObjUser::getDepartment ( )

Definition at line 640 of file class.ilObjUser.php.

640 : string
641 {
642 return $this->profile_data->getDepartment();
643 }

Referenced by ILIAS\User\Profile\Fields\Standard\Department\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getEmail()

◆ getExternalAccount()

ilObjUser::getExternalAccount ( )

Definition at line 1230 of file class.ilObjUser.php.

1230 : string
1231 {
1232 return $this->ext_account;
1233 }
string $ext_account

Referenced by ilCmiXapiUser\getIdent(), ilCmiXapiUser\getIdentAsId(), and ilECSAppEventListener\handleMembership().

+ Here is the caller graph for this function:

◆ getFax()

ilObjUser::getFax ( )

Definition at line 720 of file class.ilObjUser.php.

720 : string
721 {
722 return $this->profile_data->getFax();
723 }

Referenced by ILIAS\User\Profile\Fields\Standard\Fax\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getFirstLettersOfLastnames()

static ilObjUser::getFirstLettersOfLastnames ( ?array  $user_ids = null)
static

Definition at line 2419 of file class.ilObjUser.php.

2421 : array {
2422 global $DIC;
2423 $ilDB = $DIC['ilDB'];
2424
2425 $q = 'SELECT DISTINCT ' . $ilDB->upper($ilDB->substr('lastname', 1, 1)) . ' let' .
2426 ' FROM usr_data' .
2427 ' WHERE usr_id <> ' . $ilDB->quote(ANONYMOUS_USER_ID, 'integer') .
2428 ($user_ids !== null ? ' AND ' . $ilDB->in('usr_id', $user_ids, false, 'integer') : '') .
2429 ' ORDER BY let';
2430 $let_set = $ilDB->query($q);
2431
2432 $let = [];
2433 while ($let_rec = $ilDB->fetchAssoc($let_set)) {
2434 $let[$let_rec['let']] = $let_rec['let'];
2435 }
2436 return $let;
2437 }

◆ getFirstLogin()

ilObjUser::getFirstLogin ( )

Definition at line 996 of file class.ilObjUser.php.

996 : string
997 {
998 return $this->first_login;
999 }

◆ getFirstname()

◆ getFullname()

ilObjUser::getFullname ( int  $max_strlen = 0)
Parameters
int$max_strlenmax. string length to return (optional) if string length of fullname is greater than given a_max_strlen the name is shortened in the following way:
  1. abreviate firstname (-> Dr. J. Smith) if fullname is still too long
  2. drop title (-> John Smith) if fullname is still too long
  3. drop title and abreviate first name (J. Smith) if fullname is still too long
  4. drop title and firstname and shorten lastname to max length (--> Smith)

Definition at line 880 of file class.ilObjUser.php.

880 : string
881 {
882 if ($max_strlen === 0) {
883 return ilUtil::stripSlashes($this->fullname);
884 }
885
886 if (mb_strlen($this->fullname) <= $max_strlen) {
887 return ilUtil::stripSlashes($this->fullname);
888 }
889
890 $length_lastname = mb_strlen($this->lastname);
891 if (mb_strlen($this->utitle) + $length_lastname + 4 <= $max_strlen) {
892 return ilUtil::stripSlashes($this->utitle . ' ' . substr($this->firstname, 0, 1) . '. ' . $this->lastname);
893 }
894
895 if (mb_strlen($this->firstname) + $length_lastname + 1 <= $max_strlen) {
896 return ilUtil::stripSlashes($this->firstname . ' ' . $this->lastname);
897 }
898
899 if ($length_lastname + 3 <= $max_strlen) {
900 return ilUtil::stripSlashes(substr($this->firstname, 0, 1) . '. ' . $this->lastname);
901 }
902
903 return ilUtil::stripSlashes(substr($this->lastname, 0, $max_strlen));
904 }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")

References ilUtil\stripSlashes().

Referenced by shibUser\createFields(), ilCmiXapiUser\getName(), ilTutorialSupportBlockGUI\getTutorData(), ilDclBaseFieldRepresentation\passThroughFilter(), and ilAccountMail\send().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGender()

ilObjUser::getGender ( )

Definition at line 567 of file class.ilObjUser.php.

567 : string
568 {
569 return $this->profile_data->getGender()?->value ?? '';
570 }

Referenced by ilAccountMail\replacePlaceholders(), and ILIAS\User\Profile\Fields\Standard\Gender\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getGeneralInterests()

ilObjUser::getGeneralInterests ( )
Returns
array<string>

Definition at line 1800 of file class.ilObjUser.php.

1800 : array
1801 {
1802 return $this->profile_data->getAdditionalFieldByIdentifier(
1803 $this->profile_configuration_repository->getByClass(Interests::class)->getIdentifier()
1804 ) ?? [];
1805 }

Referenced by ILIAS\User\Profile\Fields\Standard\Interests\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getGeneralInterestsAsText()

ilObjUser::getGeneralInterestsAsText ( )

Get general interests as plain text.

Definition at line 1810 of file class.ilObjUser.php.

1810 : string
1811 {
1812 return $this->buildTextFromArray($this->getGeneralInterests());
1813 }
buildTextFromArray(array $a_attr)

◆ getHobby()

ilObjUser::getHobby ( )

Definition at line 760 of file class.ilObjUser.php.

760 : string
761 {
762 return $this->profile_data->getHobby();
763 }

Referenced by ILIAS\User\Profile\Fields\Standard\Hobby\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getInactivationDate()

ilObjUser::getInactivationDate ( )

Definition at line 1746 of file class.ilObjUser.php.

1746 : ?string
1747 {
1749 }

◆ getInstitution()

ilObjUser::getInstitution ( )

Definition at line 630 of file class.ilObjUser.php.

630 : string
631 {
632 return $this->profile_data->getInstitution();
633 }

Referenced by ILIAS\User\Profile\Fields\Standard\Institution\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getLanguage()

◆ getLastHistoryData()

ilObjUser::getLastHistoryData ( )

Definition at line 296 of file class.ilObjUser.php.

296 : ?array
297 {
298 $this->db->setLimit(1, 0);
299 $res = $this->db->queryF(
300 '
301 SELECT login, history_date FROM loginname_history
302 WHERE usr_id = %s ORDER BY history_date DESC',
303 ['integer'],
304 [$this->id]
305 );
306 $row = $this->db->fetchAssoc($res);
307 if ($row === null) {
308 return null;
309 }
310
311 return [
312 $row['login'],
313 $row['history_date']
314 ];
315 }

References $res.

Referenced by updateLogin().

+ Here is the caller graph for this function:

◆ getLastLogin()

ilObjUser::getLastLogin ( )

Definition at line 971 of file class.ilObjUser.php.

971 : string
972 {
973 return $this->last_login;
974 }

◆ getLastname()

◆ getLastPasswordChangeTS()

ilObjUser::getLastPasswordChangeTS ( )

Definition at line 935 of file class.ilObjUser.php.

935 : int
936 {
938 }

◆ getLastProfilePrompt()

ilObjUser::getLastProfilePrompt ( )

Definition at line 1006 of file class.ilObjUser.php.

1006 : string
1007 {
1009 }

◆ getLastUpdate()

ilObjUser::getLastUpdate ( )

Definition at line 1016 of file class.ilObjUser.php.

1016 : string
1017 {
1018 return $this->last_update;
1019 }

◆ getLatitude()

ilObjUser::getLatitude ( )

Definition at line 782 of file class.ilObjUser.php.

782 : ?string
783 {
784 return $this->profile_data->getGeoCoordinates()['latitude'] ?? null;
785 }

Referenced by ILIAS\User\Profile\Fields\Standard\Location\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getLocationZoom()

ilObjUser::getLocationZoom ( )

Definition at line 806 of file class.ilObjUser.php.

806 : ?int
807 {
808 return $this->profile_data->getGeoCoordinates()['zoom'] ?? null;
809 }

Referenced by ILIAS\User\Profile\Fields\Standard\Location\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getLogin()

◆ getLoginAttempts()

ilObjUser::getLoginAttempts ( )

Definition at line 1126 of file class.ilObjUser.php.

1126 : int
1127 {
1128 return $this->login_attempts;
1129 }

◆ getLongitude()

ilObjUser::getLongitude ( )

Definition at line 794 of file class.ilObjUser.php.

794 : ?string
795 {
796 return $this->profile_data->getGeoCoordinates()['longitude'] ?? null;
797 }

Referenced by ILIAS\User\Profile\Fields\Standard\Location\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getLookingForHelp()

ilObjUser::getLookingForHelp ( )

Definition at line 1852 of file class.ilObjUser.php.

1852 : array
1853 {
1854 return $this->profile_data->getAdditionalFieldByIdentifier(
1855 $this->profile_configuration_repository->getByClass(HelpLookedFor::class)->getIdentifier()
1856 ) ?? [];
1857 }

Referenced by ILIAS\User\Profile\Fields\Standard\HelpLookedFor\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getLookingForHelpAsText()

ilObjUser::getLookingForHelpAsText ( )

Definition at line 1859 of file class.ilObjUser.php.

1859 : string
1860 {
1861 return $this->buildTextFromArray($this->getLookingForHelp());
1862 }

◆ getMatriculation()

ilObjUser::getMatriculation ( )

Definition at line 730 of file class.ilObjUser.php.

730 : string
731 {
732 return $this->profile_data->getMatriculation();
733 }

Referenced by ILIAS\User\Profile\Fields\Standard\Matriculation\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getOfferingHelp()

ilObjUser::getOfferingHelp ( )
Returns
string[]

Definition at line 1829 of file class.ilObjUser.php.

1829 : array
1830 {
1831 return $this->profile_data->getAdditionalFieldByIdentifier(
1832 $this->profile_configuration_repository->getByClass(HelpOffered::class)->getIdentifier()
1833 ) ?? [];
1834 }

Referenced by ILIAS\User\Profile\Fields\Standard\HelpOffered\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getOfferingHelpAsText()

ilObjUser::getOfferingHelpAsText ( )

Get help offering as plain text.

Definition at line 1839 of file class.ilObjUser.php.

1839 : string
1840 {
1841 return $this->buildTextFromArray($this->getOfferingHelp());
1842 }

◆ getOrgUnitsRepresentation()

ilObjUser::getOrgUnitsRepresentation ( )

Definition at line 1467 of file class.ilObjUser.php.

1467 : string
1468 {
1470 }
static lookupOrgUnitsRepresentation(int $a_usr_id)

References ILIAS\Survey\Mode\getId().

Referenced by ILIAS\User\Profile\Fields\Standard\OrganisationalUnits\retrieveValueFromUser().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPasswd()

ilObjUser::getPasswd ( )
Returns
string The password is encoded depending on the current password type.

Definition at line 917 of file class.ilObjUser.php.

917 : string
918 {
919 return $this->passwd;
920 }
string $passwd

Referenced by ILIAS\Authentication\Password\LocalUserPasswordManager\verifyPassword().

+ Here is the caller graph for this function:

◆ getPasswdType()

ilObjUser::getPasswdType ( )
Returns
string password type (ilObjUser::PASSWD_PLAIN, ilObjUser::PASSWD_CRYPTED).

Definition at line 925 of file class.ilObjUser.php.

925 : string
926 {
927 return $this->passwd_type;
928 }
string $passwd_type

◆ getPasswordAge()

ilObjUser::getPasswordAge ( )

Definition at line 1197 of file class.ilObjUser.php.

1197 : int
1198 {
1199 return (int) (time() - $this->getLastPasswordChangeTS() / 86400);
1200 }

◆ getPasswordEncodingType()

ilObjUser::getPasswordEncodingType ( )

Definition at line 842 of file class.ilObjUser.php.

842 : ?string
843 {
845 }

Referenced by ILIAS\Authentication\Password\LocalUserPasswordManager\verifyPassword().

+ Here is the caller graph for this function:

◆ getPasswordPolicyResetStatus()

ilObjUser::getPasswordPolicyResetStatus ( )

Definition at line 940 of file class.ilObjUser.php.

940 : bool
941 {
943 }

◆ getPasswordSalt()

ilObjUser::getPasswordSalt ( )

Definition at line 852 of file class.ilObjUser.php.

852 : ?string
853 {
855 }

Referenced by ILIAS\Authentication\Password\LocalUserPasswordManager\encodePassword(), and ILIAS\Authentication\Password\LocalUserPasswordManager\verifyPassword().

+ Here is the caller graph for this function:

◆ getPCClipboardContent()

ilObjUser::getPCClipboardContent ( )

Add a page content item to PC clipboard (should go to another class)

Todo:
move to COPage service

Definition at line 1309 of file class.ilObjUser.php.

1309 : array // Missing array type.
1310 {
1311 $ilDB = $this->db;
1312
1313 if (!ilSession::get('user_pc_clip')) {
1314 return [];
1315 }
1316
1317 $set = $ilDB->queryF('SELECT MAX(insert_time) mtime FROM personal_pc_clipboard ' .
1318 ' WHERE user_id = %s', ['integer'], [$this->getId()]);
1319 $row = $ilDB->fetchAssoc($set);
1320
1321 $set = $ilDB->queryF(
1322 'SELECT * FROM personal_pc_clipboard ' .
1323 ' WHERE user_id = %s AND insert_time = %s ORDER BY order_nr ASC',
1324 ['integer', 'timestamp'],
1325 [$this->getId(), $row['mtime']]
1326 );
1327 $content = [];
1328 while ($row = $ilDB->fetchAssoc($set)) {
1329 $content[] = $row['content'];
1330 }
1331
1332 return $content;
1333 }

References $ilDB, ilSession\get(), and ILIAS\Survey\Mode\getId().

Referenced by ILIAS\COPage\Page\PageContentManager\pasteContents().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPersonalDataExportFile()

ilObjUser::getPersonalDataExportFile ( )

Definition at line 1687 of file class.ilObjUser.php.

1687 : string
1688 {
1689 $dir = ilExport::_getExportDirectory($this->getId(), 'xml', 'usr', 'personal_data');
1690 if (!is_dir($dir)) {
1691 return '';
1692 }
1693 foreach (ilFileUtils::getDir($dir) as $entry) {
1694 if (is_int(strpos($entry['entry'], '.zip'))) {
1695 return $entry['entry'];
1696 }
1697 }
1698
1699 return '';
1700 }
static _getExportDirectory(int $a_obj_id, string $a_type="xml", string $a_obj_type="", string $a_entity="")
@depricated Get export directory for an repository object
static getDir(string $a_dir, bool $a_rec=false, ?string $a_sub_dir="")
get directory

References ilExport\_getExportDirectory(), ilFileUtils\getDir(), and ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ getPersonalPicturePath()

ilObjUser::getPersonalPicturePath ( string  $a_size = 'small',
bool  $a_force_pic = false 
)
Parameters
string$a_size'small', 'xsmall' or 'xxsmall'
Exceptions
ilWACException

Definition at line 1476 of file class.ilObjUser.php.

1479 : string {
1480 if (isset(self::$personal_image_cache[$this->getId()][$a_size][(int) $a_force_pic])) {
1481 return self::$personal_image_cache[$this->getId()][$a_size][(int) $a_force_pic];
1482 }
1483
1484 self::$personal_image_cache[$this->getId()][$a_size][(int) $a_force_pic] = self::_getPersonalPicturePath($this->getId(), $a_size, $a_force_pic);
1485
1486 return self::$personal_image_cache[$this->getId()][$a_size][(int) $a_force_pic];
1487 }

References ILIAS\Survey\Mode\getId(), and ILIAS\Repository\int().

Referenced by ilForumAuthorInformation\getUserImagePath().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPhoneHome()

ilObjUser::getPhoneHome ( )

Definition at line 700 of file class.ilObjUser.php.

700 : string
701 {
702 return $this->profile_data->getPhoneHome();
703 }

Referenced by ILIAS\User\Profile\Fields\Standard\PhoneHome\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getPhoneMobile()

ilObjUser::getPhoneMobile ( )

Definition at line 710 of file class.ilObjUser.php.

710 : string
711 {
712 return $this->profile_data->getPhoneMobile();
713 }

Referenced by ILIAS\User\Profile\Fields\Standard\PhoneMobile\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getPhoneOffice()

ilObjUser::getPhoneOffice ( )

Definition at line 690 of file class.ilObjUser.php.

690 : string
691 {
692 return $this->profile_data->getPhoneOffice();
693 }

Referenced by ILIAS\User\Profile\Fields\Standard\PhoneOffice\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getPref()

◆ getPrefs()

ilObjUser::getPrefs ( )
Deprecated:
11

Definition at line 482 of file class.ilObjUser.php.

482 : array
483 {
484 return $this->prefs;
485 }

◆ getProfileAsString()

ilObjUser::getProfileAsString ( Language  $language)

Get formatted mail body text of user profile data.

Exceptions
ilDateTimeException

Definition at line 1513 of file class.ilObjUser.php.

1513 : string
1514 {
1515 global $DIC;
1516 $rbacreview = $DIC['rbacreview'];
1517 $profile = $DIC['user']->getProfile();
1518
1519 $language->loadLanguageModule('registration');
1520 $language->loadLanguageModule('crs');
1521
1522 $body = "{$language->txt('login')}: {$this->getLogin()}\n";
1523
1524 if ($this->profile_data->getTitle() !== '') {
1525 $body .= "{$language->txt('title')}: {$this->profile_data->getTitle()}\n";
1526 }
1527 if ($this->getGender() !== '') {
1528 $body .= ($language->txt('gender') . ': ' . $language->txt('gender_' . strtolower($this->getGender())) . "\n");
1529 }
1530 if ($this->getFirstname() !== '') {
1531 $body .= ($language->txt('firstname') . ': ' . $this->getFirstname() . "\n");
1532 }
1533 if ($this->getLastname() !== '') {
1534 $body .= ($language->txt('lastname') . ': ' . $this->getLastname() . "\n");
1535 }
1536 if ($this->getInstitution() !== '') {
1537 $body .= ($language->txt('institution') . ': ' . $this->getInstitution() . "\n");
1538 }
1539 if ($this->getDepartment() !== '') {
1540 $body .= ($language->txt('department') . ': ' . $this->getDepartment() . "\n");
1541 }
1542 if ($this->getStreet() !== '') {
1543 $body .= ($language->txt('street') . ': ' . $this->getStreet() . "\n");
1544 }
1545 if ($this->getCity() !== '') {
1546 $body .= ($language->txt('city') . ': ' . $this->getCity() . "\n");
1547 }
1548 if ($this->getZipcode() !== '') {
1549 $body .= ($language->txt('zipcode') . ': ' . $this->getZipcode() . "\n");
1550 }
1551 if ($this->getCountry() !== '') {
1552 $body .= ($language->txt('country') . ': ' . $this->getCountry() . "\n");
1553 }
1554 if ($this->getPhoneOffice() !== '') {
1555 $body .= ($language->txt('phone_office') . ': ' . $this->getPhoneOffice() . "\n");
1556 }
1557 if ($this->getPhoneHome() !== '') {
1558 $body .= ($language->txt('phone_home') . ': ' . $this->getPhoneHome() . "\n");
1559 }
1560 if ($this->getPhoneMobile() !== '') {
1561 $body .= ($language->txt('phone_mobile') . ': ' . $this->getPhoneMobile() . "\n");
1562 }
1563 if ($this->getFax() !== '') {
1564 $body .= ($language->txt('fax') . ': ' . $this->getFax() . "\n");
1565 }
1566 if ($this->getEmail() !== '') {
1567 $body .= ($language->txt('email') . ': ' . $this->getEmail() . "\n");
1568 }
1569 if ($this->getSecondEmail() !== null
1570 && $this->getSecondEmail() !== '') {
1571 $body .= ($language->txt('second_email') . ': ' . $this->getSecondEmail() . "\n");
1572 }
1573 if ($this->getHobby() !== '') {
1574 $body .= ($language->txt('hobby') . ': ' . $this->getHobby() . "\n");
1575 }
1576 if ($this->getComment() !== '') {
1577 $body .= ($language->txt('referral_comment') . ': ' . $this->getComment() . "\n");
1578 }
1579 if ($this->getMatriculation() !== '') {
1580 $body .= ($language->txt('matriculation') . ': ' . $this->getMatriculation() . "\n");
1581 }
1582 if ($this->getCreateDate() !== '') {
1587
1588 $body .= ($language->txt('create_date') . ': ' . $date . "\n");
1589 }
1590
1591 $gr = [];
1592 foreach ($rbacreview->getGlobalRoles() as $role) {
1593 if ($rbacreview->isAssigned($this->getId(), $role)) {
1594 $gr[] = ilObjRole::_lookupTitle($role);
1595 }
1596 }
1597 if (count($gr)) {
1598 $body .= ($language->txt('reg_role_info') . ': ' . implode(',', $gr) . "\n");
1599 }
1600
1601 // Time limit
1602 if ($this->getTimeLimitUnlimited()) {
1603 $body .= ($language->txt('time_limit') . ': ' . $language->txt('crs_unlimited') . "\n");
1604 } else {
1610 );
1612
1613 $start = new ilDateTime($this->getTimeLimitFrom(), IL_CAL_UNIX);
1614 $end = new ilDateTime($this->getTimeLimitUntil(), IL_CAL_UNIX);
1615
1616 $body .= $language->txt('time_limit') . ': ' .
1617 $language->txt('from') . ' ' .
1618 $start->get(IL_CAL_DATETIME) . ' ';
1619 $body .= $language->txt('to') . ' ' . $end->get(IL_CAL_DATETIME) . "\n";
1620 }
1621
1622 foreach ($profile->getAllUserDefinedFields() as $field) {
1623 $data = $field->retrieveValueFromUser($this);
1624 if ($data !== '') {
1625 $body .= "{$field->getLabel($this->lng)}: {$data}\n";
1626 }
1627 }
1628
1629 return $body;
1630 }
const IL_CAL_UNIX
const IL_CAL_DATETIME
static resetToDefaults()
reset to defaults
static setUseRelativeDates(bool $a_status)
set use relative dates
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false, ?ilObjUser $user=null)
Format a period of two dates Shows: 14.
static setLanguage(ilLanguage $a_lng)
@classDescription Date and time handling
getCreateDate()
Get create date in YYYY-MM-DD HH-MM-SS format.
loadLanguageModule(string $a_module)
txt(string $a_topic, string $a_default_lang_fallback_mod="")

References $data, $DIC, ilObject\_lookupTitle(), ilDatePresentation\formatDate(), ilDatePresentation\formatPeriod(), IL_CAL_DATETIME, IL_CAL_UNIX, ILIAS\Language\Language\loadLanguageModule(), ilDatePresentation\resetToDefaults(), ilDatePresentation\setLanguage(), ilDatePresentation\setUseRelativeDates(), and ILIAS\Language\Language\txt().

Referenced by ilAccountMail\send(), and ilECSAppEventListener\sendNotification().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getProfileData()

ilObjUser::getProfileData ( )

Definition at line 547 of file class.ilObjUser.php.

547 : Data
548 {
549 return $this->profile_data;
550 }
Data $profile_data

Referenced by ILIAS\User\Profile\Fields\Custom\Custom\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getProfileIncomplete()

ilObjUser::getProfileIncomplete ( )

Definition at line 1147 of file class.ilObjUser.php.

1147 : bool
1148 {
1149 if ($this->id == ANONYMOUS_USER_ID) {
1150 return false;
1151 }
1153 }

References ANONYMOUS_USER_ID.

◆ getProfileStatusOfUsers()

static ilObjUser::getProfileStatusOfUsers ( array  $a_user_ids)
static

Definition at line 2526 of file class.ilObjUser.php.

2528 : array {
2529 global $DIC;
2530 $ilDB = $DIC->database();
2531
2532 $set = $ilDB->query(
2533 'SELECT * FROM usr_pref ' .
2534 ' WHERE keyword = ' . $ilDB->quote('public_profile', 'text') .
2535 ' AND ' . $ilDB->in('usr_id', $a_user_ids, false, 'integer')
2536 );
2537 $r = [
2538 'global' => [],
2539 'local' => [],
2540 'public' => [],
2541 'not_public' => []
2542 ];
2543 while ($rec = $ilDB->fetchAssoc($set)) {
2544 if ($rec['value'] == 'g') {
2545 $r['global'][] = $rec['usr_id'];
2546 $r['public'][] = $rec['usr_id'];
2547 }
2548 if ($rec['value'] == 'y') {
2549 $r['local'][] = $rec['usr_id'];
2550 $r['public'][] = $rec['usr_id'];
2551 }
2552 }
2553 foreach ($a_user_ids as $id) {
2554 if (!in_array($id, $r['public'])) {
2555 $r['not_public'][] = $id;
2556 }
2557 }
2558
2559 return $r;
2560 }

Referenced by ilInternalLink\searchUsers().

+ Here is the caller graph for this function:

◆ getPublicName()

ilObjUser::getPublicName ( )

Definition at line 1646 of file class.ilObjUser.php.

1646 : string
1647 {
1648 if ($this->hasPublicProfile()) {
1649 return $this->getFirstname() . ' ' . $this->getLastname() . ' (' . $this->getLogin() . ')';
1650 }
1651
1652 return $this->getLogin();
1653 }

Referenced by ilPDMailBlockGUI\getListItemForData().

+ Here is the caller graph for this function:

◆ getSecondEmail()

ilObjUser::getSecondEmail ( )

Definition at line 750 of file class.ilObjUser.php.

750 : ?string
751 {
752 return $this->profile_data->getSecondEmail();
753 }

Referenced by ILIAS\Mail\UserSettings\IncomingMail\buildTransformation(), and ILIAS\User\Profile\Fields\Standard\SecondEmail\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getSkin()

ilObjUser::getSkin ( )

Definition at line 1076 of file class.ilObjUser.php.

1076 : string
1077 {
1078 return $this->prefs['skin'];
1079 }

Referenced by ILIAS\Style\System\UserSettings\Style\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getStreet()

ilObjUser::getStreet ( )

Definition at line 650 of file class.ilObjUser.php.

650 : string
651 {
652 return $this->profile_data->getStreet();
653 }

Referenced by ILIAS\User\Profile\Fields\Standard\Street\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getTimeFormat()

ilObjUser::getTimeFormat ( )

Definition at line 435 of file class.ilObjUser.php.

435 : string
436 {
437 $format = $this->getPref('time_format');
438 if ($format !== null) {
439 return $format;
440 }
441 return ilCalendarSettings::_getInstance()->getDefaultTimeFormat();
442 }

References ilCalendarSettings\_getInstance().

Referenced by ilIndividualAssessmentDateFormatter\getUserDateFormat(), and ILIAS\Calendar\UserSettings\TimeFormat\retrieveValueFromUser().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTimeLimitFrom()

ilObjUser::getTimeLimitFrom ( )

Definition at line 1096 of file class.ilObjUser.php.

1096 : ?int
1097 {
1099 }

Referenced by ilAccountMail\replacePlaceholders(), and ilAccountMail\send().

+ Here is the caller graph for this function:

◆ getTimeLimitOwner()

ilObjUser::getTimeLimitOwner ( )

Definition at line 1086 of file class.ilObjUser.php.

1086 : int
1087 {
1089 }

◆ getTimeLimitUnlimited()

ilObjUser::getTimeLimitUnlimited ( )

Definition at line 1116 of file class.ilObjUser.php.

1116 : bool
1117 {
1119 }

Referenced by ilAccountMail\replacePlaceholders().

+ Here is the caller graph for this function:

◆ getTimeLimitUntil()

ilObjUser::getTimeLimitUntil ( )

Definition at line 1106 of file class.ilObjUser.php.

1106 : ?int
1107 {
1109 }

Referenced by ilECSAppEventListener\extendAccount(), ilAccountMail\replacePlaceholders(), and ilAccountMail\send().

+ Here is the caller graph for this function:

◆ getTimeZone()

ilObjUser::getTimeZone ( )

Definition at line 426 of file class.ilObjUser.php.

426 : string
427 {
428 $tz = $this->getPref('user_tz');
429 if ($tz !== null) {
430 return $tz;
431 }
432 return ilCalendarSettings::_getInstance()->getDefaultTimeZone();
433 }

References ilCalendarSettings\_getInstance().

Referenced by ILIAS\Calendar\UserSettings\TimeZone\retrieveValueFromUser().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getUserIdByLogin()

◆ getUserIdsByEmail()

static ilObjUser::getUserIdsByEmail ( string  $a_email)
static

Definition at line 2877 of file class.ilObjUser.php.

2877 : array
2878 {
2879 global $DIC;
2880 $ilDB = $DIC['ilDB'];
2881
2882 $res = $ilDB->queryF(
2883 'SELECT usr_id FROM usr_data ' .
2884 'WHERE email = %s and active = 1',
2885 ['text'],
2886 [$a_email]
2887 );
2888 $ids = [];
2889 while ($row = $ilDB->fetchObject($res)) {
2890 $ids[] = (int) $row->usr_id;
2891 }
2892
2893 return $ids;
2894 }

References $DIC, $ilDB, $res, and ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ getUserIdsByInactivityPeriod()

static ilObjUser::getUserIdsByInactivityPeriod ( int  $periodInDays)
static

Definition at line 2342 of file class.ilObjUser.php.

2344 : array {
2345 global $DIC;
2346 $ilDB = $DIC['ilDB'];
2347
2348 if ($periodInDays < 1) {
2349 throw new ilException('Invalid period given');
2350 }
2351
2352 $date = date('Y-m-d H:i:s', (time() - ($periodInDays * 24 * 60 * 60)));
2353
2354 $query = 'SELECT usr_id FROM usr_data WHERE last_login IS NOT NULL AND last_login < %s';
2355
2356 $ids = [];
2357
2358 $types = ['timestamp'];
2359 $values = [$date];
2360
2361 $res = $ilDB->queryF($query, $types, $values);
2362 while ($row = $ilDB->fetchAssoc($res)) {
2363 $ids[] = (int) $row['usr_id'];
2364 }
2365
2366 return $ids;
2367 }

Referenced by ilCronDeleteInactiveUserAccounts\run().

+ Here is the caller graph for this function:

◆ getUserIdsNeverLoggedIn()

static ilObjUser::getUserIdsNeverLoggedIn ( int  $thresholdInDays)
static

Definition at line 2369 of file class.ilObjUser.php.

2371 : array {
2372 global $DIC;
2373 $ilDB = $DIC['ilDB'];
2374
2375 $date = date('Y-m-d H:i:s', (time() - ($thresholdInDays * 24 * 60 * 60)));
2376
2377 $query = 'SELECT usr_id FROM usr_data WHERE last_login IS NULL AND create_date < %s';
2378
2379 $ids = [];
2380
2381 $types = ['timestamp'];
2382 $values = [$date];
2383
2384 $res = $ilDB->queryF($query, $types, $values);
2385 while ($row = $ilDB->fetchAssoc($res)) {
2386 $ids[] = (int) $row['usr_id'];
2387 }
2388
2389 return $ids;
2390 }

Referenced by ilCronDeleteNeverLoggedInUserAccounts\run().

+ Here is the caller graph for this function:

◆ getUserLoginsByEmail()

static ilObjUser::getUserLoginsByEmail ( string  $a_email)
static

Definition at line 2896 of file class.ilObjUser.php.

2896 : array
2897 {
2898 global $DIC;
2899 $ilDB = $DIC['ilDB'];
2900
2901 $res = $ilDB->queryF(
2902 'SELECT login FROM usr_data ' .
2903 'WHERE email = %s and active = 1',
2904 ['text'],
2905 [$a_email]
2906 );
2907 $ids = [];
2908 while ($row = $ilDB->fetchObject($res)) {
2909 $ids[] = $row->login;
2910 }
2911
2912 return $ids;
2913 }

References $DIC, $ilDB, and $res.

Referenced by ilPasswordAssistanceGUI\submitUsernameAssistanceForm().

+ Here is the caller graph for this function:

◆ getUserSubsetByPreferenceValue()

static ilObjUser::getUserSubsetByPreferenceValue ( array  $a_user_ids,
string  $a_keyword,
string  $a_val 
)
static

Definition at line 2160 of file class.ilObjUser.php.

2164 : array {
2165 global $DIC;
2166 $ilDB = $DIC['ilDB'];
2167
2168 $users = [];
2169 $set = $ilDB->query(
2170 'SELECT usr_id FROM usr_pref ' .
2171 ' WHERE keyword = ' . $ilDB->quote($a_keyword, 'text') .
2172 ' AND ' . $ilDB->in('usr_id', $a_user_ids, false, 'integer') .
2173 ' AND value = ' . $ilDB->quote($a_val, 'text')
2174 );
2175 while ($rec = $ilDB->fetchAssoc($set)) {
2176 $users[] = $rec['usr_id'];
2177 }
2178 return $users;
2179 }

Referenced by ILIAS\Awareness\User\Collector\collectUsers().

+ Here is the caller graph for this function:

◆ getUTitle()

ilObjUser::getUTitle ( )

Definition at line 581 of file class.ilObjUser.php.

581 : string
582 {
583 return $this->profile_data->getTitle();
584 }

Referenced by ilCmiXapiUser\getName(), and ILIAS\User\Profile\Fields\Standard\Title\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ getZipcode()

ilObjUser::getZipcode ( )

Definition at line 670 of file class.ilObjUser.php.

670 : string
671 {
672 return $this->profile_data->getZipcode();
673 }

Referenced by ILIAS\User\Profile\Fields\Standard\ZipCode\retrieveValueFromUser().

+ Here is the caller graph for this function:

◆ hasActiveSession()

static ilObjUser::hasActiveSession ( int  $a_user_id,
string  $a_session_id 
)
static

Definition at line 2959 of file class.ilObjUser.php.

2962 : bool {
2963 global $DIC;
2964 $ilDB = $DIC['ilDB'];
2965
2966 $set = $ilDB->queryf(
2967 '
2968 SELECT COUNT(*) session_count
2969 FROM usr_session WHERE user_id = %s AND expires > %s AND session_id != %s ',
2970 ['integer', 'integer', 'text'],
2971 [$a_user_id, time(), $a_session_id]
2972 );
2973 $row = $ilDB->fetchAssoc($set);
2974 return (bool) $row['session_count'];
2975 }

Referenced by ilAuthFrontend\checkSimultaneousLogins().

+ Here is the caller graph for this function:

◆ hasDeletionFlag()

ilObjUser::hasDeletionFlag ( )

Definition at line 1771 of file class.ilObjUser.php.

1771 : bool
1772 {
1773 return (bool) $this->getPref('delete_flag');
1774 }

◆ hasProfilePicture()

ilObjUser::hasProfilePicture ( )

Definition at line 1489 of file class.ilObjUser.php.

1489 : bool
1490 {
1491 return (new ilUserAvatarResolver($this->getId()))->hasProfilePicture();
1492 }

References ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ hasPublicProfile()

ilObjUser::hasPublicProfile ( )

Definition at line 1641 of file class.ilObjUser.php.

1641 : bool
1642 {
1643 return in_array($this->getPref('public_profile'), ['y', 'g']);
1644 }

Referenced by ilMailFolderGUI\executeTableAction().

+ Here is the caller graph for this function:

◆ importPersonalData()

ilObjUser::importPersonalData ( array  $a_file,
bool  $a_profile_data,
bool  $a_settings,
bool  $a_notes,
bool  $a_calendar 
)

Definition at line 1711 of file class.ilObjUser.php.

1717 : void {
1718 $imp = new ilImport();
1719 // bookmarks need to be skipped, importer does not exist anymore
1720 $imp->addSkipImporter('components/ILIAS/Bookmarks');
1721 if (!$a_profile_data) {
1722 $imp->addSkipEntity('components/ILIAS/User', 'usr_profile');
1723 }
1724 if (!$a_settings) {
1725 $imp->addSkipEntity('components/ILIAS/User', 'usr_setting');
1726 }
1727 if (!$a_notes) {
1728 $imp->addSkipEntity('components/ILIAS/Notes', 'user_notes');
1729 }
1730 if (!$a_calendar) {
1731 $imp->addSkipEntity('components/ILIAS/Calendar', 'calendar');
1732 }
1733 $imp->importEntity(
1734 $a_file['tmp_name'],
1735 $a_file['name'],
1736 'usr',
1737 'components/ILIAS/User'
1738 );
1739 }
Import class.

◆ isAnonymous()

ilObjUser::isAnonymous ( )

Definition at line 1751 of file class.ilObjUser.php.

1751 : bool
1752 {
1753 return self::_isAnonymous($this->getId());
1754 }
static _isAnonymous(int $usr_id)

References ILIAS\Survey\Mode\getId().

Referenced by ilUsersGalleryGUI\getActionsSection(), ilMailGlobalServices\getNewMailsData(), and ilTutorialSupportBlockGUI\isUserValid().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isPasswordChangeDemanded()

ilObjUser::isPasswordChangeDemanded ( )

Definition at line 1155 of file class.ilObjUser.php.

1155 : bool
1156 {
1157 if ($this->id === ANONYMOUS_USER_ID) {
1158 return false;
1159 }
1160
1161 if ($this->id === SYSTEM_USER_ID) {
1162 if (LocalUserPasswordManager::getInstance()->verifyPassword($this, base64_decode('aG9tZXI='))
1164 ) {
1165 return true;
1166 }
1167 return false;
1168 }
1169
1171 && ($this->getPasswordPolicyResetStatus()
1172 || ilSecuritySettings::_getInstance()->isPasswordChangeOnFirstLoginEnabled()
1173 && $this->getLastPasswordChangeTS() === 0
1174 && $this->is_self_registered === false);
1175 }
static _needsExternalAccountByAuthMode($a_auth_mode)
Check if chosen auth mode needs an external account entry.
getAuthMode(bool $a_auth_key=false)
getPasswordPolicyResetStatus()
static _getInstance()
Get instance of ilSecuritySettings.
const SYSTEM_USER_ID
This file contains constants for PHPStan analyis, see: https://phpstan.org/config-reference#constants...
Definition: constants.php:26

References ilSecuritySettings\_getInstance(), ilAuthUtils\_needsExternalAccountByAuthMode(), ANONYMOUS_USER_ID, and SYSTEM_USER_ID.

Referenced by ILIAS\Authentication\Password\LocalUserPasswordManager\allowPasswordChange().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isPasswordExpired()

ilObjUser::isPasswordExpired ( )

Definition at line 1177 of file class.ilObjUser.php.

1177 : bool
1178 {
1179 if ($this->id === ANONYMOUS_USER_ID
1180 || $this->getLastPasswordChangeTS() === 0) {
1181 return false;
1182 }
1183
1184 $max_pass_age_in_seconds = ilSecuritySettings::_getInstance()->getPasswordMaxAge() * 86400;
1185 if ($max_pass_age_in_seconds === 0) {
1186 return false;
1187 }
1188
1189 if (time() - $this->getLastPasswordChangeTS() > $max_pass_age_in_seconds
1191 return true;
1192 }
1193
1194 return false;
1195 }

References ilSecuritySettings\_getInstance(), ilAuthUtils\_needsExternalAccountByAuthMode(), and ANONYMOUS_USER_ID.

Referenced by ILIAS\Authentication\Password\LocalUserPasswordManager\allowPasswordChange().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSelfRegistered()

ilObjUser::isSelfRegistered ( )

Definition at line 1781 of file class.ilObjUser.php.

1781 : bool
1782 {
1784 }

◆ lookupMatriculation()

static ilObjUser::lookupMatriculation ( int  $a_usr_id)
static

Definition at line 2486 of file class.ilObjUser.php.

2486 : string
2487 {
2488 global $DIC;
2489 $ilDB = $DIC['ilDB'];
2490
2491 $query = 'SELECT matriculation FROM usr_data ' .
2492 'WHERE usr_id = ' . $ilDB->quote($a_usr_id);
2493 $res = $ilDB->query($query);
2494 $row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT);
2495 return $row->matriculation ?: '';
2496 }

References $DIC, $ilDB, $res, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilObjCourseGrouping\_checkGroupingDependencies().

+ Here is the caller graph for this function:

◆ lookupOrgUnitsRepresentation()

static ilObjUser::lookupOrgUnitsRepresentation ( int  $a_usr_id)
static

Definition at line 3160 of file class.ilObjUser.php.

3162 : string {
3163 return ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($a_usr_id);
3164 }

Referenced by ilUserTableGUI\getItems(), and ilMemberExport\write().

+ Here is the caller graph for this function:

◆ prepareAndRetrievePasswordForStorage()

ilObjUser::prepareAndRetrievePasswordForStorage ( )
private

Definition at line 266 of file class.ilObjUser.php.

266 : string
267 {
268 if ($this->passwd_type === self::PASSWD_PLAIN
269 && $this->passwd !== '') {
270 LocalUserPasswordManager::getInstance()->encodePassword($this, $this->passwd);
271 }
272
273 return $this->passwd;
274 }

References $passwd.

Referenced by buildSystemInformationArrayForDB().

+ Here is the caller graph for this function:

◆ read()

ilObjUser::read ( )
Exceptions
ilObjectNotFoundException
ilObjectTypeMismatchException
ilSystemStyleException

Reimplemented from ilObject.

Definition at line 139 of file class.ilObjUser.php.

139 : void
140 {
141 $this->profile_data = $this->profile_data_repository->getSingle($this->id);
142 $this->setFullname();
143 $this->assignSystemInformationFromDB($this->profile_data->getSystemInformation());
144
145 $this->readPrefs();
146
147 parent::read();
148 }
assignSystemInformationFromDB(array $data)

References assignSystemInformationFromDB(), readPrefs(), and setFullname().

Referenced by __construct(), and update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readPrefs()

ilObjUser::readPrefs ( )
private

Definition at line 487 of file class.ilObjUser.php.

487 : void
488 {
489 $this->prefs = self::_getPreferences($this->id);
490 if (!isset($this->prefs['style'])
491 || $this->prefs['style'] === ''
492 || !ilStyleDefinition::styleExists($this->prefs['style'])
493 || !ilStyleDefinition::skinExists($this->prefs['skin'])
494 && ilStyleDefinition::styleExistsForSkinId($this->prefs['skin'], $this->prefs['style'])) {
495 $this->prefs['skin'] = $this->ilias->ini->readVariable('layout', 'skin');
496 $this->prefs['style'] = $this->ilias->ini->readVariable('layout', 'style');
497 }
498 }
static _getPreferences(int $user_id)
static skinExists(string $skin_id, ?ilSystemStyleConfig $system_style_config=null)
Check whether a skin exists.
static styleExists(string $style_id)
static styleExistsForSkinId(string $skin_id, string $style_id)

References ilStyleDefinition\skinExists(), ilStyleDefinition\styleExists(), and ilStyleDefinition\styleExistsForSkinId().

Referenced by read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ refreshLogin()

ilObjUser::refreshLogin ( )

Definition at line 976 of file class.ilObjUser.php.

976 : void
977 {
978 $this->last_login = $this->db->now();
979
980 $old_first_login = $this->first_login;
981 if ($old_first_login === '') {
982 $this->first_login = $this->db->now();
983 $this->app_event_handler->raise(
984 'components/ILIAS/User',
985 'firstLogin',
986 ['user_obj' => $this]
987 );
988 }
989 }

◆ removeDeletionFlag()

ilObjUser::removeDeletionFlag ( )

Definition at line 1766 of file class.ilObjUser.php.

1766 : void
1767 {
1768 $this->writePref('delete_flag', false);
1769 }

◆ removeObjectFromClipboard()

ilObjUser::removeObjectFromClipboard ( int  $a_item_id,
string  $a_type 
)

Definition at line 1454 of file class.ilObjUser.php.

1457 : void {
1458 $ilDB = $this->db;
1459
1460 $q = 'DELETE FROM personal_clipboard WHERE ' .
1461 'item_id = ' . $ilDB->quote($a_item_id, 'integer') .
1462 ' AND type = ' . $ilDB->quote($a_type, 'text') . ' ' .
1463 ' AND user_id = ' . $ilDB->quote($this->getId(), 'integer');
1464 $ilDB->manipulate($q);
1465 }

◆ removeUserPicture()

ilObjUser::removeUserPicture ( )

Definition at line 1499 of file class.ilObjUser.php.

1499 : void
1500 {
1501 if ($this->getAvatarRid() !== null) {
1502 $this->irss->manage()->remove($this->getAvatarRid(), new ilUserProfilePictureStakeholder());
1503 }
1504
1505 $this->profile_data = $this->profile_data->withAvatarRid(null);
1506 $this->update();
1507 }

Referenced by ILIAS\User\Profile\Fields\Standard\Avatar\uploadUserPicture().

+ Here is the caller graph for this function:

◆ resetLastPasswordChange()

ilObjUser::resetLastPasswordChange ( )

Definition at line 1207 of file class.ilObjUser.php.

1207 : void
1208 {
1209 $this->last_password_change_ts = 0;
1210 }

◆ resetOwner()

ilObjUser::resetOwner ( )

Definition at line 1655 of file class.ilObjUser.php.

1655 : void
1656 {
1657 $ilDB = $this->db;
1658
1659 $query = 'UPDATE object_data SET owner = 0 ' .
1660 'WHERE owner = ' . $ilDB->quote($this->getId(), 'integer');
1661 $ilDB->query($query);
1662 }

References $ilDB, and ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ resetPassword()

ilObjUser::resetPassword ( string  $new_raw_password)

Definition at line 284 of file class.ilObjUser.php.

284 : bool
285 {
286 LocalUserPasswordManager::getInstance()->encodePassword($this, $new_raw_password);
287 $this->profile_data_repository->storePasswordFor(
288 $this->id,
289 $this->passwd,
290 $this->password_encoding_type,
291 $this->password_salt
292 );
293 return true;
294 }

Referenced by ILIAS\Authentication\Password\LocalUserPasswordManager\verifyPassword().

+ Here is the caller graph for this function:

◆ retrieveAgreeDateForStorage()

ilObjUser::retrieveAgreeDateForStorage ( )
private

Definition at line 276 of file class.ilObjUser.php.

276 : ?string
277 {
278 if (is_string($this->agree_date && strtotime($this->agree_date) === false)) {
279 return null;
280 }
281 return $this->agree_date;
282 }

References $agree_date.

Referenced by buildSystemInformationArrayForDB().

+ Here is the caller graph for this function:

◆ saveAsNew()

ilObjUser::saveAsNew ( )

Definition at line 150 of file class.ilObjUser.php.

150 : void
151 {
152 $this->inactivation_date = null;
153 if ($this->active === 0) {
154 $this->inactivation_date = date('Y-m-d H:i:s');
155 }
156
157 $system_information = $this->buildSystemInformationArrayForDB();
158 $system_information['create_date'] = $this->data_factory->clock()->utc()->now()
159 ->format(self::DATABASE_DATE_FORMAT);
160
161 $this->profile_data = $this->profile_data->withId($this->id);
162 $this->profile_data_repository->store(
163 $this->profile_data->withSystemInformation($this->buildSystemInformationArrayForDB())
164 );
165
166 // CREATE ENTRIES FOR MAIL BOX
167 $mbox = new ilMailbox($this->id);
168 $mbox->createDefaultFolder();
169
170 $mail_options = new ilMailOptions($this->id);
171 $mail_options->createMailOptionsEntry();
172
173 $this->app_event_handler->raise(
174 'components/ILIAS/User',
175 'afterCreate',
176 ['user_obj' => $this]
177 );
178 }
buildSystemInformationArrayForDB()

References buildSystemInformationArrayForDB().

+ Here is the call graph for this function:

◆ sendPersonalDataFile()

ilObjUser::sendPersonalDataFile ( )

Definition at line 1702 of file class.ilObjUser.php.

1702 : void
1703 {
1704 $file = ilExport::_getExportDirectory($this->getId(), 'xml', 'usr', 'personal_data') .
1705 '/' . $this->getPersonalDataExportFile();
1706 if (is_file($file)) {
1708 }
1709 }
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)

References ilExport\_getExportDirectory(), ilFileDelivery\deliverFileLegacy(), and ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ setActive()

ilObjUser::setActive ( bool  $active,
int  $owner = 0 
)

set user active state and updates system fields appropriately

Parameters
int$a_ownerthe id of the person who approved the account, defaults to 6 (root)

Definition at line 1048 of file class.ilObjUser.php.

1051 : void {
1052 $this->setOwner($owner);
1053
1054 $current_active = $this->active;
1055 if ($active) {
1056 $this->active = 1;
1057 $this->setApproveDate(date('Y-m-d H:i:s'));
1058 $this->setInactivationDate(null);
1059 $this->setOwner($owner);
1060 return;
1061 }
1062
1063 $this->active = 0;
1064 $this->setApproveDate(null);
1065
1066 if ($this->getId() > 0 && $current_active !== $active) {
1068 }
1069 }
setInactivationDate(?string $inactivation_date)
setApproveDate(?string $a_str)
set date the user account was activated null indicates that the user has not yet been activated
setOwner(int $usr_id)

Referenced by shibUser\create(), shibUser\createFields(), and ilStartUpGUI\processCode().

+ Here is the caller graph for this function:

◆ setAgreeDate()

ilObjUser::setAgreeDate ( ?string  $date)

Definition at line 1039 of file class.ilObjUser.php.

1039 : void
1040 {
1041 $this->agree_date = $date;
1042 }

◆ setApproveDate()

ilObjUser::setApproveDate ( ?string  $a_str)

set date the user account was activated null indicates that the user has not yet been activated

Definition at line 1025 of file class.ilObjUser.php.

1025 : void
1026 {
1027 $this->approve_date = $a_str;
1028 }

◆ setAuthMode()

ilObjUser::setAuthMode ( ?string  $a_str)

Definition at line 1212 of file class.ilObjUser.php.

1212 : void
1213 {
1214 $this->auth_mode = $a_str;
1215 }

◆ setAvatarRid()

ilObjUser::setAvatarRid ( ?ResourceIdentification  $avatar_rid)

Definition at line 816 of file class.ilObjUser.php.

816 : void
817 {
818 $this->profile_data = $this->profile_data->withAvatarRid($avatar_rid);
819 }

◆ setBirthday()

ilObjUser::setBirthday ( ?string  $birthday)

Definition at line 608 of file class.ilObjUser.php.

608 : void
609 {
610 if ($birthday === null || $birthday === '') {
611 $this->profile_data = $this->profile_data->withBirthday(null);
612 return;
613 }
614
615 $this->profile_data = $this->profile_data->withBirthday(
616 new \DateTimeImmutable($birthday, new DateTimeZone('UTC'))
617 );
618 }

◆ setCity()

ilObjUser::setCity ( string  $city)

Definition at line 655 of file class.ilObjUser.php.

655 : void
656 {
657 $this->profile_data = $this->profile_data->withCity($city);
658 }

◆ setClientIP()

ilObjUser::setClientIP ( string  $a_str)

Definition at line 821 of file class.ilObjUser.php.

821 : void
822 {
823 $this->client_ip = $a_str;
824 }

◆ setComment()

ilObjUser::setComment ( string  $referral_comment)

Definition at line 765 of file class.ilObjUser.php.

765 : void
766 {
767 $this->profile_data = $this->profile_data->withReferralComment($referral_comment);
768 }

◆ setCountry()

ilObjUser::setCountry ( string  $country)

Definition at line 675 of file class.ilObjUser.php.

675 : void
676 {
677 $this->profile_data = $this->profile_data->withCountry($country);
678 }

Referenced by shibUser\createFields(), and shibUser\updateFields().

+ Here is the caller graph for this function:

◆ setCurrentLanguage()

ilObjUser::setCurrentLanguage ( string  $language)

Set current language.

Definition at line 961 of file class.ilObjUser.php.

961 : void
962 {
963 ilSession::set('lang', $language);
964 }

References ilSession\set().

Referenced by ILIAS\LearningModule\Export\LMHtmlExport\initLanguage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setDepartment()

ilObjUser::setDepartment ( string  $department)

Definition at line 635 of file class.ilObjUser.php.

635 : void
636 {
637 $this->profile_data = $this->profile_data->withDepartment($department);
638 }

Referenced by shibUser\createFields(), and shibUser\updateFields().

+ Here is the caller graph for this function:

◆ setEmail()

ilObjUser::setEmail ( string  $email)

Definition at line 735 of file class.ilObjUser.php.

735 : void
736 {
737 $this->profile_data = $this->profile_data->withEmail($email);
738 }

Referenced by shibUser\createFields(), and shibUser\updateFields().

+ Here is the caller graph for this function:

◆ setExternalAccount()

ilObjUser::setExternalAccount ( string  $a_str)

Definition at line 1225 of file class.ilObjUser.php.

1225 : void
1226 {
1227 $this->ext_account = $a_str;
1228 }

Referenced by shibUser\createFields().

+ Here is the caller graph for this function:

◆ setFax()

ilObjUser::setFax ( string  $fax)

Definition at line 715 of file class.ilObjUser.php.

715 : void
716 {
717 $this->profile_data = $this->profile_data->withFax($fax);
718 }

Referenced by shibUser\createFields(), and shibUser\updateFields().

+ Here is the caller graph for this function:

◆ setFeedPass()

ilObjUser::setFeedPass ( string  $a_password)

Definition at line 1632 of file class.ilObjUser.php.

1634 : void {
1635 $this->writePref(
1636 'priv_feed_pass',
1637 ($a_password == '') ? '' : md5($a_password)
1638 );
1639 }

◆ setFirstLogin()

ilObjUser::setFirstLogin ( string  $date)

Definition at line 991 of file class.ilObjUser.php.

991 : void
992 {
993 $this->first_login = $date;
994 }

◆ setFirstname()

ilObjUser::setFirstname ( string  $firstname)

Definition at line 586 of file class.ilObjUser.php.

586 : void
587 {
588 $this->profile_data = $this->profile_data->withFirstname($firstname);
589 $this->setFullname();
590 }

Referenced by shibUser\createFields(), and shibUser\updateFields().

+ Here is the caller graph for this function:

◆ setFullname()

ilObjUser::setFullname ( )

Definition at line 862 of file class.ilObjUser.php.

862 : void
863 {
864 $title = $this->profile_data->getTitle() !== '' ? "{$this->profile_data->getTitle()} " : '';
865 $this->fullname = "{$title}{$this->profile_data->getFirstname()} {$this->profile_data->getLastname()}";
866 }
string $title

Referenced by read().

+ Here is the caller graph for this function:

◆ setGender()

ilObjUser::setGender ( string  $gender_string)

Definition at line 562 of file class.ilObjUser.php.

562 : void
563 {
564 $this->profile_data = $this->profile_data->withGender(Genders::tryFrom($gender_string));
565 }

Referenced by shibUser\createFields(), and shibUser\updateFields().

+ Here is the caller graph for this function:

◆ setGeneralInterests()

ilObjUser::setGeneralInterests ( ?array  $value = null)
Parameters
array<string>|null$value

Definition at line 1789 of file class.ilObjUser.php.

1789 : void
1790 {
1791 $this->profile_data = $this->profile_data->withAdditionalFieldByIdentifier(
1792 $this->profile_configuration_repository->getByClass(Interests::class)->getIdentifier(),
1793 $value ?? []
1794 );
1795 }

◆ setHobby()

ilObjUser::setHobby ( string  $hobby)

Definition at line 755 of file class.ilObjUser.php.

755 : void
756 {
757 $this->profile_data = $this->profile_data->withHobby($hobby);
758 }

Referenced by shibUser\createFields(), and shibUser\updateFields().

+ Here is the caller graph for this function:

◆ setInactivationDate()

ilObjUser::setInactivationDate ( ?string  $inactivation_date)

Definition at line 1741 of file class.ilObjUser.php.

1741 : void
1742 {
1743 $this->inactivation_date = $inactivation_date;
1744 }

◆ setInstitution()

ilObjUser::setInstitution ( string  $instituion)

Definition at line 625 of file class.ilObjUser.php.

625 : void
626 {
627 $this->profile_data = $this->profile_data->withInstitution($instituion);
628 }

Referenced by shibUser\createFields(), and shibUser\updateFields().

+ Here is the caller graph for this function:

◆ setIsSelfRegistered()

ilObjUser::setIsSelfRegistered ( bool  $status)

Definition at line 1776 of file class.ilObjUser.php.

1776 : void
1777 {
1778 $this->is_self_registered = $status;
1779 }

◆ setLanguage()

ilObjUser::setLanguage ( string  $language)

Definition at line 831 of file class.ilObjUser.php.

831 : void
832 {
833 $this->setPref('language', $language);
834 ilSession::clear('lang');
835 }
setPref(string $a_keyword, ?string $a_value)
static clear(string $a_var)

References ilSession\clear().

Referenced by shibUser\createFields(), ILIAS\LearningModule\Export\LMHtmlExport\initLanguage(), and shibUser\updateFields().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLastLogin()

ilObjUser::setLastLogin ( string  $a_str)

Definition at line 966 of file class.ilObjUser.php.

966 : void
967 {
968 $this->last_login = $a_str;
969 }

◆ setLastname()

ilObjUser::setLastname ( string  $lastname)

Definition at line 597 of file class.ilObjUser.php.

597 : void
598 {
599 $this->profile_data = $this->profile_data->withLastname($lastname);
600 $this->setFullname();
601 }

Referenced by shibUser\createFields(), and shibUser\updateFields().

+ Here is the caller graph for this function:

◆ setLastPasswordChangeToNow()

ilObjUser::setLastPasswordChangeToNow ( )

Definition at line 1202 of file class.ilObjUser.php.

1202 : void
1203 {
1204 $this->last_password_change_ts = time();
1205 }

Referenced by shibUser\buildInstance().

+ Here is the caller graph for this function:

◆ setLastPasswordChangeTS()

ilObjUser::setLastPasswordChangeTS ( int  $a_last_password_change_ts)

Definition at line 930 of file class.ilObjUser.php.

930 : void
931 {
932 $this->last_password_change_ts = $a_last_password_change_ts;
933 }

◆ setLastProfilePrompt()

ilObjUser::setLastProfilePrompt ( string  $date)

Definition at line 1001 of file class.ilObjUser.php.

1001 : void
1002 {
1003 $this->last_profile_prompt = $date;
1004 }

◆ setLastUpdate()

ilObjUser::setLastUpdate ( string  $date)

Definition at line 1011 of file class.ilObjUser.php.

1011 : void
1012 {
1013 $this->last_update = $date;
1014 }

◆ setLatitude()

ilObjUser::setLatitude ( ?string  $latitude)

Definition at line 775 of file class.ilObjUser.php.

775 : void
776 {
777 $coordinates = $this->profile_data->getGeoCoordinates();
778 $coordinates['latitude'] = $latitude;
779 $this->profile_data = $this->profile_data->withGeoCoordinates($coordinates);
780 }

Referenced by ILIAS\User\Profile\Fields\Standard\Location\addValueToUserObject().

+ Here is the caller graph for this function:

◆ setLocationZoom()

ilObjUser::setLocationZoom ( ?int  $zoom)

Definition at line 799 of file class.ilObjUser.php.

799 : void
800 {
801 $coordinates = $this->profile_data->getGeoCoordinates();
802 $coordinates['zoom'] = $zoom;
803 $this->profile_data = $this->profile_data->withGeoCoordinates($coordinates);
804 }

◆ setLogin()

ilObjUser::setLogin ( string  $login)

Definition at line 552 of file class.ilObjUser.php.

552 : void
553 {
554 $this->profile_data = $this->profile_data->withAlias($login);
555 }

Referenced by shibUser\createFields().

+ Here is the caller graph for this function:

◆ setLoginAttempts()

ilObjUser::setLoginAttempts ( int  $a_login_attempts)

Definition at line 1121 of file class.ilObjUser.php.

1121 : void
1122 {
1123 $this->login_attempts = $a_login_attempts;
1124 }

◆ setLongitude()

ilObjUser::setLongitude ( ?string  $longitude)

Definition at line 787 of file class.ilObjUser.php.

787 : void
788 {
789 $coordinates = $this->profile_data->getGeoCoordinates();
790 $coordinates['longitude'] = $longitude;
791 $this->profile_data = $this->profile_data->withGeoCoordinates($coordinates);
792 }

◆ setLookingForHelp()

ilObjUser::setLookingForHelp ( ?array  $value = null)

Definition at line 1844 of file class.ilObjUser.php.

1844 : void
1845 {
1846 $this->profile_data = $this->profile_data->withAdditionalFieldByIdentifier(
1847 $this->profile_configuration_repository->getByClass(HelpLookedFor::class)->getIdentifier(),
1848 $value ?? []
1849 );
1850 }

◆ setMatriculation()

ilObjUser::setMatriculation ( string  $matriculation)

Definition at line 725 of file class.ilObjUser.php.

725 : void
726 {
727 $this->profile_data = $this->profile_data->withMatriculation($matriculation);
728 }

Referenced by shibUser\createFields(), and shibUser\updateFields().

+ Here is the caller graph for this function:

◆ setOfferingHelp()

ilObjUser::setOfferingHelp ( ?array  $value = null)
Parameters
string[] | null$value

Definition at line 1818 of file class.ilObjUser.php.

1818 : void
1819 {
1820 $this->profile_data = $this->profile_data->withAdditionalFieldByIdentifier(
1821 $this->profile_configuration_repository->getByClass(HelpOffered::class)->getIdentifier(),
1822 $value ?? []
1823 );
1824 }

◆ setPasswd()

ilObjUser::setPasswd ( string  $a_str,
string  $a_type = ilObjUser::PASSWD_PLAIN 
)

Definition at line 906 of file class.ilObjUser.php.

909 : void {
910 $this->passwd = $a_str;
911 $this->passwd_type = $a_type;
912 }

Referenced by assignSystemInformationFromDB(), shibUser\createFields(), and ILIAS\Authentication\Password\LocalUserPasswordManager\encodePassword().

+ Here is the caller graph for this function:

◆ setPasswordEncodingType()

ilObjUser::setPasswordEncodingType ( ?string  $password_encryption_type)

Definition at line 847 of file class.ilObjUser.php.

847 : void
848 {
849 $this->password_encoding_type = $password_encryption_type;
850 }

Referenced by ILIAS\Authentication\Password\LocalUserPasswordManager\encodePassword().

+ Here is the caller graph for this function:

◆ setPasswordPolicyResetStatus()

ilObjUser::setPasswordPolicyResetStatus ( bool  $status)

Definition at line 945 of file class.ilObjUser.php.

945 : void
946 {
947 $this->passwd_policy_reset = $status;
948 }

◆ setPasswordSalt()

ilObjUser::setPasswordSalt ( ?string  $password_salt)

Definition at line 857 of file class.ilObjUser.php.

857 : void
858 {
859 $this->password_salt = $password_salt;
860 }

Referenced by ILIAS\Authentication\Password\LocalUserPasswordManager\encodePassword().

+ Here is the caller graph for this function:

◆ setPhoneHome()

ilObjUser::setPhoneHome ( string  $phone)

Definition at line 695 of file class.ilObjUser.php.

695 : void
696 {
697 $this->profile_data = $this->profile_data->withPhoneHome($phone);
698 }

Referenced by shibUser\createFields(), and shibUser\updateFields().

+ Here is the caller graph for this function:

◆ setPhoneMobile()

ilObjUser::setPhoneMobile ( string  $phone)

Definition at line 705 of file class.ilObjUser.php.

705 : void
706 {
707 $this->profile_data = $this->profile_data->withPhoneMobile($phone);
708 }

Referenced by shibUser\createFields(), and shibUser\updateFields().

+ Here is the caller graph for this function:

◆ setPhoneOffice()

ilObjUser::setPhoneOffice ( string  $phone)

Definition at line 685 of file class.ilObjUser.php.

685 : void
686 {
687 $this->profile_data = $this->profile_data->withPhoneOffice($phone);
688 }

Referenced by shibUser\createFields(), and shibUser\updateFields().

+ Here is the caller graph for this function:

◆ setPref()

ilObjUser::setPref ( string  $a_keyword,
?string  $a_value 
)

Definition at line 467 of file class.ilObjUser.php.

467 : void
468 {
469 if ($a_keyword !== '') {
470 $this->prefs[$a_keyword] = $a_value;
471 }
472 }

Referenced by ILIAS\Help\UserSettings\Help\persistUserInput(), ILIAS\Style\System\UserSettings\Style\persistUserInput(), ILIAS\Notifications\UserSettings\PushNotification\persistUserInput(), ILIAS\User\Profile\ChecklistStatus\setStepSucessOnUser(), and ilMembershipNotifications\toggleUser().

+ Here is the caller graph for this function:

◆ setProfileIncomplete()

ilObjUser::setProfileIncomplete ( bool  $a_prof_inc)

Definition at line 1142 of file class.ilObjUser.php.

1142 : void
1143 {
1144 $this->profile_incomplete = $a_prof_inc;
1145 }

◆ setSecondEmail()

ilObjUser::setSecondEmail ( ?string  $email)

Definition at line 745 of file class.ilObjUser.php.

745 : void
746 {
747 $this->profile_data = $this->profile_data->withSecondEmail($email);
748 }

◆ setStreet()

ilObjUser::setStreet ( string  $street)

Definition at line 645 of file class.ilObjUser.php.

645 : void
646 {
647 $this->profile_data = $this->profile_data->withStreet($street);
648 }

Referenced by shibUser\createFields(), and shibUser\updateFields().

+ Here is the caller graph for this function:

◆ setTimeLimitFrom()

ilObjUser::setTimeLimitFrom ( ?int  $a_from)

Definition at line 1091 of file class.ilObjUser.php.

1091 : void
1092 {
1093 $this->time_limit_from = $a_from;
1094 }

Referenced by shibUser\createFields().

+ Here is the caller graph for this function:

◆ setTimeLimitOwner()

ilObjUser::setTimeLimitOwner ( int  $a_owner)

Definition at line 1081 of file class.ilObjUser.php.

1081 : void
1082 {
1083 $this->time_limit_owner = $a_owner;
1084 }

Referenced by ilObjUserGUI\addValuesFromSystemInformationToUserSection().

+ Here is the caller graph for this function:

◆ setTimeLimitUnlimited()

ilObjUser::setTimeLimitUnlimited ( bool  $unlimited)

Definition at line 1111 of file class.ilObjUser.php.

1111 : void
1112 {
1113 $this->time_limit_unlimited = $unlimited;
1114 }

Referenced by ilRegistrationCode\applyAccessLimits(), shibUser\createFields(), and ilStartUpGUI\processCode().

+ Here is the caller graph for this function:

◆ setTimeLimitUntil()

ilObjUser::setTimeLimitUntil ( ?int  $a_until)

Definition at line 1101 of file class.ilObjUser.php.

1101 : void
1102 {
1103 $this->time_limit_until = $a_until;
1104 }

Referenced by ilRegistrationCode\applyAccessLimits(), shibUser\createFields(), ilECSAppEventListener\extendAccount(), and ilStartUpGUI\processCode().

+ Here is the caller graph for this function:

◆ setUTitle()

ilObjUser::setUTitle ( string  $user_title)

This sets the USER's title NOT the OBJECT's title!

Definition at line 575 of file class.ilObjUser.php.

575 : void
576 {
577 $this->setFullname();
578 $this->profile_data = $this->profile_data->withTitle($user_title);
579 }

Referenced by shibUser\createFields(), and shibUser\updateFields().

+ Here is the caller graph for this function:

◆ setZipcode()

ilObjUser::setZipcode ( string  $zipcode)

Definition at line 665 of file class.ilObjUser.php.

665 : void
666 {
667 $this->profile_data = $this->profile_data->withZipcode($zipcode);
668 }

Referenced by shibUser\createFields(), and shibUser\updateFields().

+ Here is the caller graph for this function:

◆ update()

ilObjUser::update ( )

Reimplemented from ilObject.

Definition at line 180 of file class.ilObjUser.php.

180 : bool
181 {
182 $this->profile_data_repository->store(
183 $this->profile_data->withSystemInformation($this->buildSystemInformationArrayForDB())
184 );
185
186 $this->writePrefs();
187
188 parent::update();
189 $this->updateOwner();
190
191 $this->read();
192
193 $this->app_event_handler->raise(
194 'components/ILIAS/User',
195 'afterUpdate',
196 ['user_obj' => $this]
197 );
198
199 return true;
200 }
updateOwner()
update owner of object in db

References read(), ilObject\updateOwner(), and writePrefs().

Referenced by ilECSAppEventListener\extendAccount(), ILIAS\Notifications\UserSettings\PushNotification\persistUserInput(), and ilStartUpGUI\processCode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateLogin()

ilObjUser::updateLogin ( string  $login)

Definition at line 317 of file class.ilObjUser.php.

317 : bool
318 {
319 if ($login === '' || $login === $this->profile_data->getAlias()) {
320 return false;
321 }
322
323 $last_history_entry = $this->getLastHistoryData();
324
325 if (!$this->profile_configuration_repository
326 ->getByClass(Alias::class)->isChangeableByUser()) {
327 throw new ilUserException($this->lng->txt('permission_denied'));
328 }
329
330 // throw exception if the desired loginame is already in history and it is not allowed to reuse it
331 if ($this->settings->get('reuse_of_loginnames') === '0'
332 && self::_doesLoginnameExistInHistory($login)) {
333 throw new ilUserException($this->lng->txt('loginname_already_exists'));
334 }
335
336 if ((int) $this->settings->get('loginname_change_blocking_time') > 0
337 && is_array($last_history_entry)
338 && $last_history_entry[1] + (int) $this->settings->get('loginname_change_blocking_time') > time()) {
339 throw new ilUserException(
340 sprintf(
341 $this->lng->txt('changing_loginname_not_possible_info'),
343 new ilDateTime($last_history_entry[1], IL_CAL_UNIX)
344 ),
346 new ilDateTime(($last_history_entry[1] + (int) $this->settings->get('loginname_change_blocking_time')), IL_CAL_UNIX)
347 )
348 )
349 );
350 }
351
352 if ($this->settings->get('create_history_loginname') === '1') {
353 $this->writeHistory($this->profile_data->getAlias());
354 }
355
356 $this->profile_data = $this->profile_data->withAlias($login);
357 $this->profile_data_repository->storeLoginFor($this->id, $this->profile_data->getAlias());
358
359 return true;
360 }
writeHistory(string $login)

References ilDatePresentation\formatDate(), getLastHistoryData(), IL_CAL_UNIX, ILIAS\Repository\lng(), ILIAS\Repository\settings(), and writeHistory().

+ Here is the call graph for this function:

◆ uploadPersonalPicture()

ilObjUser::uploadPersonalPicture ( string  $tmp_file)

Definition at line 1865 of file class.ilObjUser.php.

1867 : bool {
1868 $stakeholder = new ilUserProfilePictureStakeholder();
1869 $stakeholder->setOwner($this->getId());
1870 $stream = Streams::ofResource(fopen($tmp_file, 'rb'));
1871
1872 if ($this->getAvatarRid() !== null && $this->getAvatarRid() !== ilObjUser::NO_AVATAR_RID) {
1873 $rid = $this->irss->manage()->find($this->getAvatarRid());
1874 // append profile picture
1875 $this->irss->manage()->replaceWithStream(
1876 $rid,
1877 $stream,
1878 $stakeholder
1879 );
1880 } else {
1881 // new profile picture
1882 $rid = $this->irss->manage()->stream(
1883 $stream,
1884 $stakeholder
1885 );
1886 }
1887
1888 $this->setAvatarRid($rid);
1889 $this->update();
1890 return true;
1891 }
setAvatarRid(?ResourceIdentification $avatar_rid)

◆ userExists()

static ilObjUser::userExists ( array  $a_usr_ids = [])
static

Definition at line 2439 of file class.ilObjUser.php.

2441 : bool {
2442 global $DIC;
2443 $ilDB = $DIC['ilDB'];
2444
2445 $query = 'SELECT count(*) num FROM object_data od ' .
2446 'JOIN usr_data ud ON obj_id = usr_id ' .
2447 'WHERE ' . $ilDB->in('obj_id', $a_usr_ids, false, 'integer') . ' ';
2448 $res = $ilDB->query($query);
2449 $num_rows = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)->num;
2450 return $num_rows == count($a_usr_ids);
2451 }

Referenced by ilTrQuery\filterOutUsersWithoutData(), ilExerciseManagementCollectFilesJob\getAssignmentMembersIds(), ilObjForumAccess\getCachedUserInstance(), ilIndividualAssessmentMembersTableGUI\getGradedByInformation(), and ilNewsForContextBlockGUI\showNews().

+ Here is the caller graph for this function:

◆ withProfileData()

ilObjUser::withProfileData ( Data  $profile_data)

Definition at line 540 of file class.ilObjUser.php.

540 : self
541 {
542 $clone = clone $this;
543 $clone->profile_data = $profile_data;
544 return $clone;
545 }

Referenced by ilUserImportParser\addUDFDataToUser().

+ Here is the caller graph for this function:

◆ writeHistory()

ilObjUser::writeHistory ( string  $login)
private

Definition at line 362 of file class.ilObjUser.php.

362 : void
363 {
364 $res = $this->db->queryF(
365 'SELECT * FROM loginname_history WHERE usr_id = %s AND login = %s AND history_date = %s',
366 ['integer', 'text', 'integer'],
367 [$this->id, $login, time()]
368 );
369
370 if ($this->db->numRows($res) == 0) {
371 $this->db->manipulateF(
372 '
373 INSERT INTO loginname_history
374 (usr_id, login, history_date)
375 VALUES (%s, %s, %s)',
376 ['integer', 'text', 'integer'],
377 [$this->id, $login, time()]
378 );
379 }
380 }

References $res.

Referenced by updateLogin().

+ Here is the caller graph for this function:

◆ writePref()

ilObjUser::writePref ( string  $keyword,
string  $value 
)

Definition at line 382 of file class.ilObjUser.php.

385 : void {
386 $this->db->replace(
387 'usr_pref',
388 [
389 'usr_id' => [ilDBConstants::T_INTEGER, $this->id],
390 'keyword' => [ilDBConstants::T_TEXT, $keyword],
391 ],
392 [
393 'value' => [ilDBConstants::T_TEXT,$value]
394 ]
395 );
396 $this->setPref($keyword, $value);
397 }

Referenced by ilPDNotesGUI\changeRelatedObject(), ilObjSurveyQuestionPoolGUI\createQuestionObject(), and ilPageEditorGUI\setMediaMode().

+ Here is the caller graph for this function:

◆ writePrefs()

ilObjUser::writePrefs ( )

Definition at line 418 of file class.ilObjUser.php.

418 : void
419 {
420 $this->deleteAllPrefs();
421 foreach ($this->prefs as $keyword => $value) {
422 $this->writePref($keyword, (string) $value);
423 }
424 }

Referenced by ilMembershipNotifications\toggleUser(), and update().

+ Here is the caller graph for this function:

Field Documentation

◆ $active

int ilObjUser::$active = 0
private

Definition at line 65 of file class.ilObjUser.php.

Referenced by buildSystemInformationArrayForDB().

◆ $agree_date

string ilObjUser::$agree_date = null
private

Definition at line 64 of file class.ilObjUser.php.

Referenced by retrieveAgreeDateForStorage().

◆ $approve_date

string ilObjUser::$approve_date = null
private

Definition at line 63 of file class.ilObjUser.php.

Referenced by buildSystemInformationArrayForDB().

◆ $auth_mode

string ilObjUser::$auth_mode = null
private

Definition at line 67 of file class.ilObjUser.php.

Referenced by buildSystemInformationArrayForDB().

◆ $auth_session

ilAuthSession ilObjUser::$auth_session
private

Definition at line 89 of file class.ilObjUser.php.

◆ $client_ip

string ilObjUser::$client_ip = ''
private

Definition at line 66 of file class.ilObjUser.php.

Referenced by buildSystemInformationArrayForDB().

◆ $cron_delete_user_reminder_mail

ilCronDeleteInactiveUserReminderMail ilObjUser::$cron_delete_user_reminder_mail
private

Definition at line 86 of file class.ilObjUser.php.

◆ $ctrl

ilCtrl ilObjUser::$ctrl
private

Definition at line 90 of file class.ilObjUser.php.

◆ $data_factory

DataFactory ilObjUser::$data_factory
private

Definition at line 85 of file class.ilObjUser.php.

◆ $delivery

StreamDelivery ilObjUser::$delivery
private

Definition at line 84 of file class.ilObjUser.php.

◆ $ext_account

string ilObjUser::$ext_account = ''
private

Definition at line 52 of file class.ilObjUser.php.

◆ $first_login

string ilObjUser::$first_login = ''
private

Definition at line 77 of file class.ilObjUser.php.

Referenced by buildSystemInformationArrayForDB().

◆ $fullname

string ilObjUser::$fullname
private

Definition at line 53 of file class.ilObjUser.php.

◆ $inactivation_date

string ilObjUser::$inactivation_date = null
private

Definition at line 74 of file class.ilObjUser.php.

Referenced by buildSystemInformationArrayForDB().

◆ $irss

Services ilObjUser::$irss
private

Definition at line 87 of file class.ilObjUser.php.

◆ $is_self_registered

bool ilObjUser::$is_self_registered = false
private

Definition at line 75 of file class.ilObjUser.php.

Referenced by buildSystemInformationArrayForDB().

◆ $last_login

string ilObjUser::$last_login = ''
private

Definition at line 58 of file class.ilObjUser.php.

Referenced by buildSystemInformationArrayForDB().

◆ $last_password_change_ts

int ilObjUser::$last_password_change_ts = 0
private

Definition at line 68 of file class.ilObjUser.php.

Referenced by buildSystemInformationArrayForDB().

◆ $last_profile_prompt

string ilObjUser::$last_profile_prompt = ''
private

Definition at line 76 of file class.ilObjUser.php.

Referenced by buildSystemInformationArrayForDB().

◆ $login_attempts

int ilObjUser::$login_attempts = 0
private

Definition at line 70 of file class.ilObjUser.php.

Referenced by buildSystemInformationArrayForDB().

◆ $passwd

string ilObjUser::$passwd = ''
private

Definition at line 59 of file class.ilObjUser.php.

Referenced by prepareAndRetrievePasswordForStorage().

◆ $passwd_policy_reset

bool ilObjUser::$passwd_policy_reset = false
private

Definition at line 69 of file class.ilObjUser.php.

Referenced by buildSystemInformationArrayForDB().

◆ $passwd_type

string ilObjUser::$passwd_type = ''
private

Definition at line 60 of file class.ilObjUser.php.

◆ $password_encoding_type

string ilObjUser::$password_encoding_type = null
private

Definition at line 61 of file class.ilObjUser.php.

Referenced by buildSystemInformationArrayForDB().

◆ $password_salt

string ilObjUser::$password_salt = null
private

Definition at line 62 of file class.ilObjUser.php.

Referenced by buildSystemInformationArrayForDB().

◆ $personal_image_cache

array ilObjUser::$personal_image_cache = []
staticprivate

Definition at line 73 of file class.ilObjUser.php.

◆ $prefs

array ilObjUser::$prefs = []
private

Definition at line 72 of file class.ilObjUser.php.

◆ $profile_configuration_repository

ProfileConfigurationRepository ilObjUser::$profile_configuration_repository
private

Definition at line 82 of file class.ilObjUser.php.

◆ $profile_data

Data ilObjUser::$profile_data
private

Definition at line 80 of file class.ilObjUser.php.

◆ $profile_data_repository

ProfileDataRepository ilObjUser::$profile_data_repository
private

Definition at line 81 of file class.ilObjUser.php.

◆ $profile_incomplete

bool ilObjUser::$profile_incomplete = false
private

Definition at line 78 of file class.ilObjUser.php.

Referenced by buildSystemInformationArrayForDB().

◆ $settings

ilSetting ilObjUser::$settings
private

Definition at line 88 of file class.ilObjUser.php.

◆ $time_limit_from

int ilObjUser::$time_limit_from = null
private

Definition at line 56 of file class.ilObjUser.php.

Referenced by buildSystemInformationArrayForDB().

◆ $time_limit_owner

int ilObjUser::$time_limit_owner = 7
private

Definition at line 57 of file class.ilObjUser.php.

Referenced by buildSystemInformationArrayForDB().

◆ $time_limit_unlimited

bool ilObjUser::$time_limit_unlimited = false
private

Definition at line 54 of file class.ilObjUser.php.

Referenced by buildSystemInformationArrayForDB().

◆ $time_limit_until

int ilObjUser::$time_limit_until = null
private

Definition at line 55 of file class.ilObjUser.php.

Referenced by buildSystemInformationArrayForDB().

◆ DATABASE_DATE_FORMAT

const ilObjUser::DATABASE_DATE_FORMAT = 'Y-m-d H:i:s'

Definition at line 50 of file class.ilObjUser.php.

Referenced by ilSoapUtils\deleteExpiredDualOptInUserObjects().

◆ PASSWD_CRYPTED

◆ PASSWD_PLAIN


The documentation for this class was generated from the following file: