ILIAS  release_7 Revision v7.30-3-g800a261c036
ilObjUser Class Reference
+ Inheritance diagram for ilObjUser:
+ Collaboration diagram for ilObjUser:

Public Member Functions

 __construct ($a_user_id=0, $a_call_by_reference=false)
 Constructor public. More...
 
 read ()
 loads a record "user" from database private More...
 
 getPasswordEncodingType ()
 
 setPasswordEncodingType ($password_encryption_type)
 
 getPasswordSalt ()
 
 setPasswordSalt ($password_salt)
 
 assignData ($a_data)
 loads a record "user" from array public More...
 
 writeAccepted ()
 write accept date of user agreement to db More...
 
 refreshLogin ()
 updates the login data of a "user" // TODO set date with now() should be enough public More...
 
 updateLogin ($a_login)
 update login name More...
 
 writePref ($a_keyword, $a_value)
 write userpref to user table private More...
 
 deletePref ($a_keyword)
 Deletes a userpref value of the user from the database public. More...
 
 writePrefs ()
 write all userprefs private More...
 
 getTimeZone ()
 get timezone of user More...
 
 getTimeFormat ()
 get time format More...
 
 getDateFormat ()
 get date format More...
 
 setPref ($a_keyword, $a_value)
 set a user preference More...
 
 getPref ($a_keyword)
 get a user preference More...
 
 readPrefs ()
 get all user preferences private More...
 
 delete ()
 deletes a user public More...
 
 setFullname ($a_title="", $a_firstname="", $a_lastname="")
 builds a string with title + firstname + lastname method is used to build fullname in member variable $this->fullname. More...
 
 getFullname ($a_max_strlen=0)
 get fullname public More...
 
 setLogin ($a_str)
 set login / username public More...
 
 getLogin ()
 get login / username public More...
 
 setPasswd ($a_str, $a_type=IL_PASSWD_PLAIN)
 set password public More...
 
 getPasswd ()
 get password More...
 
 getPasswdType ()
 get password type More...
 
 setGender ($a_str)
 set gender public More...
 
 getGender ()
 get gender public More...
 
 setUTitle ($a_str)
 set user title (note: don't mix up this method with setTitle() that is derived from ilObject and sets the user object's title) public More...
 
 getUTitle ()
 get user title (note: don't mix up this method with getTitle() that is derived from ilObject and gets the user object's title) public More...
 
 setFirstname ($a_str)
 set firstname public More...
 
 getFirstname ()
 get firstname public More...
 
 setLastname ($a_str)
 set lastame public More...
 
 getLastname ()
 get lastname public More...
 
 setInstitution ($a_str)
 set institution public More...
 
 getInstitution ()
 get institution public More...
 
 setDepartment ($a_str)
 set department public More...
 
 getDepartment ()
 get department public More...
 
 setStreet ($a_str)
 set street public More...
 
 getStreet ()
 get street public More...
 
 setCity ($a_str)
 set city public More...
 
 getCity ()
 get city public More...
 
 setZipcode ($a_str)
 set zipcode public More...
 
 getZipcode ()
 get zipcode public More...
 
 setCountry ($a_str)
 Set country (free text) More...
 
 getCountry ()
 Get country (free text) More...
 
 setSelectedCountry ($a_val)
 Set selected country (selection drop down) More...
 
 getSelectedCountry ()
 Get selected country (selection drop down) More...
 
 setPhoneOffice ($a_str)
 set office phone public More...
 
 getPhoneOffice ()
 get office phone public More...
 
 setPhoneHome ($a_str)
 set home phone public More...
 
 getPhoneHome ()
 get home phone public More...
 
 setPhoneMobile ($a_str)
 set mobile phone public More...
 
 getPhoneMobile ()
 get mobile phone public More...
 
 setFax ($a_str)
 set fax public More...
 
 getFax ()
 get fax public More...
 
 setClientIP ($a_str)
 set client ip number public More...
 
 getClientIP ()
 get client ip number public More...
 
 setMatriculation ($a_str)
 set matriculation number public More...
 
 getMatriculation ()
 get matriculation number public More...
 
 setEmail ($a_str)
 set email public More...
 
 getEmail ()
 get email address public More...
 
 getSecondEmail ()
 
 setSecondEmail ($second_email)
 
 setHobby ($a_str)
 set hobby public More...
 
 getHobby ()
 get hobby public More...
 
 setLanguage ($a_str)
 set user language public More...
 
 getLanguage ()
 returns a 2char-language-string public More...
 
 setLastPasswordChangeTS ($a_last_password_change_ts)
 
 getLastPasswordChangeTS ()
 
 getPasswordPolicyResetStatus ()
 
 setPasswordPolicyResetStatus (bool $status)
 
 getCurrentLanguage ()
 returns the current language (may differ from user's pref setting!) More...
 
 setCurrentLanguage ($a_val)
 Set current language. More...
 
 setLastLogin ($a_str)
 set user's last login public More...
 
 getLastLogin ()
 returns last login date public More...
 
 setFirstLogin ($a_str)
 set user's first login More...
 
 getFirstLogin ()
 returns first login date More...
 
 setLastProfilePrompt ($a_str)
 set user's last profile prompt More...
 
 getLastProfilePrompt ()
 returns user's last profile prompt More...
 
 setLastUpdate ($a_str)
 set last update of user data set public More...
 
 getLastUpdate ()
 
 setComment ($a_str)
 set referral comment public More...
 
 getComment ()
 get referral comment public More...
 
 setApproveDate ($a_str)
 set date the user account was activated null indicates that the user has not yet been activated public More...
 
 getApproveDate ()
 get the date when the user account was approved public More...
 
 getAgreeDate ()
 get the date when the user accepted the user agreement public More...
 
 setAgreeDate ($a_str)
 set date the user account was accepted by the user nullindicates that the user has not accepted his account public More...
 
 setActive ($a_active, $a_owner=0)
 set user active state and updates system fields appropriately public More...
 
 getActive ()
 get user active state public More...
 
 syncActive ()
 synchronizes current and stored user active values for the owner value to be set correctly, this function should only be called when an admin is approving a user account public More...
 
 getStoredActive ($a_id)
 get user active state More...
 
 setSkin ($a_str)
 set user skin (template set) public More...
 
 setTimeLimitOwner ($a_owner)
 
 getTimeLimitOwner ()
 
 setTimeLimitFrom ($a_from)
 
 getTimeLimitFrom ()
 
 setTimeLimitUntil ($a_until)
 
 getTimeLimitUntil ()
 
 setTimeLimitUnlimited ($a_unlimited)
 
 getTimeLimitUnlimited ()
 
 setTimeLimitMessage ($a_time_limit_message)
 
 getTimeLimitMessage ()
 
 setLoginAttempts ($a_login_attempts)
 
 getLoginAttempts ()
 
 checkTimeLimit ()
 
 setProfileIncomplete ($a_prof_inc)
 
 getProfileIncomplete ()
 
 isPasswordChangeDemanded ()
 
 isPasswordExpired ()
 
 getPasswordAge ()
 
 setLastPasswordChangeToNow ()
 
 resetLastPasswordChange ()
 
 setLatitude ($a_latitude)
 Set Latitude. More...
 
 getLatitude ()
 Get Latitude. More...
 
 setLongitude ($a_longitude)
 Set Longitude. More...
 
 getLongitude ()
 Get Longitude. More...
 
 setLocationZoom ($a_locationzoom)
 Set Location Zoom. More...
 
 getLocationZoom ()
 Get Location Zoom. More...
 
 checkUserId ()
 
 isCurrentUserActive ()
 
 getLoginByUserId ($a_userid)
 
 addObjectToClipboard ( $a_item_id, $a_type, $a_title, $a_parent=0, $a_time=0, $a_order_nr=0)
 add an item to user's personal clipboard More...
 
 addToPCClipboard ($a_content, $a_time, $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 ($a_type)
 Check whether clipboard has objects of a certain type. More...
 
 clipboardDeleteObjectsOfType ($a_type)
 Delete objects of type for user. More...
 
 clipboardDeleteAll ()
 Delete objects of type for user. More...
 
 getClipboardObjects ($a_type="", $a_top_nodes_only=false)
 get all clipboard objects of user and specified type More...
 
 getClipboardChilds ($a_parent, $a_insert_time)
 Get childs of an item. More...
 
 removeObjectFromClipboard ($a_item_id, $a_type)
 remove object from user's personal clipboard More...
 
 getOrgUnitsRepresentation ()
 
 setAuthMode ($a_str)
 set auth mode public More...
 
 getAuthMode ($a_auth_key=false)
 get auth mode public More...
 
 setExternalAccount ($a_str)
 set external account More...
 
 getExternalAccount ()
 get external account More...
 
 getPersonalPicturePath ($a_size="small", $a_force_pic=false)
 Get path to personal picture. More...
 
 getAvatar ()
 
 removeUserPicture ($a_do_update=true)
 Remove user picture. More...
 
 setUserDefinedData ($a_data)
 
 getUserDefinedData ()
 
 updateUserDefinedFields ()
 
 readUserDefinedFields ()
 
 addUserDefinedFieldEntry ()
 
 deleteUserDefinedFieldEntries ()
 
 hasPublicProfile ()
 returns true if public is profile, false otherwise More...
 
 getPublicName ()
 returns firstname lastname and login if profile is public, login otherwise More...
 
 setBirthday ($a_birthday)
 
 getBirthday ()
 
 resetOwner ()
 
 isCaptchaVerified ()
 Is user captcha verified? More...
 
 setCaptchaVerified ($a_val)
 Set captcha verified. More...
 
 exportPersonalData ()
 Export personal data. More...
 
 getPersonalDataExportFile ()
 Get personal data export file. More...
 
 sendPersonalDataFile ()
 Send personal data file. More...
 
 importPersonalData ( $a_file, $a_profile_data, $a_settings, $a_notes, $a_calendar)
 Import personal data. More...
 
 setInactivationDate ($inactivation_date)
 setter for inactivation date More...
 
 getInactivationDate ()
 getter for inactivation date More...
 
 hasToAcceptTermsOfService ()
 
 hasToAcceptTermsOfServiceInSession ($status=null)
 
 isAnonymous ()
 
 activateDeletionFlag ()
 
 removeDeletionFlag ()
 
 hasDeletionFlag ()
 
 setIsSelfRegistered ($status)
 
 isSelfRegistered ()
 
 setGeneralInterests (array $value=null)
 Set general interests. More...
 
 getGeneralInterests ()
 Get general interests. More...
 
 getGeneralInterestsAsText ()
 Get general interests as plain text. More...
 
 setOfferingHelp (array $value=null)
 Set help offering. More...
 
 getOfferingHelp ()
 Get help offering. More...
 
 getOfferingHelpAsText ()
 Get help offering as plain text. More...
 
 setLookingForHelp (array $value=null)
 Set help looking for. More...
 
 getLookingForHelp ()
 Get help looking for. More...
 
 getLookingForHelpAsText ()
 Get help looking for as plain text. More...
 
 updateMultiTextFields ($a_create=false)
 Write multi-text values to DB. More...
 
- Public Member Functions inherited from ilObject
 __construct ($a_id=0, $a_reference=true)
 Constructor public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ()
 read object data from db into object More...
 
 getId ()
 get object id public More...
 
 setId ($a_id)
 set object id public More...
 
 setRefId ($a_id)
 set reference id public More...
 
 getRefId ()
 get reference id public More...
 
 getType ()
 get object type public More...
 
 setType ($a_type)
 set object type public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title public More...
 
 getUntranslatedTitle ()
 get untranslated object title public More...
 
 setTitle ($a_title)
 set object title More...
 
 getDescription ()
 get object description More...
 
 setDescription ($a_desc)
 set object description More...
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 get import id More...
 
 setImportId ($a_import_id)
 set import id More...
 
 setOfflineStatus ($a_status)
 Set offline status. More...
 
 getOfflineStatus ()
 Get offline status. More...
 
 supportsOfflineHandling ()
 Check whether object supports offline handling. More...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date public More...
 
 getLastUpdateDate ()
 get last update date public More...
 
 getDiskUsage ()
 Gets the disk usage of the object in bytes. More...
 
 create ()
 create More...
 
 update ()
 update object in db More...
 
 MDUpdateListener ($a_element)
 Meta data update listener. More...
 
 createMetaData ()
 create meta data entry More...
 
 updateMetaData ()
 update meta data entry More...
 
 deleteMetaData ()
 delete meta data entry More...
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 setParentRolePermissions ($a_parent_ref)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object More...
 
 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 If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 getPossibleSubObjects ($a_filter=true)
 get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static _lookupFullname ($a_user_id)
 Lookup Full Name. More...
 
static _lookupEmail ($a_user_id)
 Lookup email. More...
 
static _lookupSecondEmail ($a_user_id)
 Lookup second e-mail. More...
 
static _lookupGender ($a_user_id)
 Lookup gender. More...
 
static _lookupClientIP ($a_user_id)
 Lookup client ip. More...
 
static _lookupName ($a_user_id)
 lookup user name More...
 
static _lookupFields ($a_user_id)
 lookup fields (deprecated; use more specific methods instead) More...
 
static _lookupLogin ($a_user_id)
 lookup login More...
 
static _lookupExternalAccount ($a_user_id)
 lookup external account for login and authmethod More...
 
static _lookupId ($a_user_str)
 Lookup id by login. More...
 
static _lookupLastLogin ($a_user_id)
 lookup last login More...
 
static _lookupFirstLogin ($a_user_id)
 lookup first login More...
 
static _doesLoginnameExistInHistory ($a_login)
 Checks wether the passed loginname already exists in history. More...
 
static _getLastHistoryDataByUserId ($a_usr_id)
 Returns the last used loginname and the changedate of the passed user_id. More...
 
static _deleteAllPref ($a_user_id)
 Deletes a userpref value of the user from the database public. More...
 
static _writePref ($a_usr_id, $a_keyword, $a_value)
 
static _lookupPref ($a_usr_id, $a_keyword)
 
static lookupMatriculation ($a_usr_id)
 Lookup matriculation. More...
 
static _lookupLanguage ($a_usr_id)
 
static _writeExternalAccount ($a_usr_id, $a_ext_id)
 
static _writeAuthMode ($a_usr_id, $a_auth_mode)
 
static _lookupActive ($a_usr_id)
 Check user account active. More...
 
static hasActiveSession ($a_user_id, $a_session_id)
 Check for simultaneous login. More...
 
static toUsernameWithoutDomain ($a_login)
 Static function removes Microsoft domain name from username webdav related. More...
 
static getUserIdByLogin ($a_login)
 
static getUserIdsByEmail ($a_email)
 STATIC METHOD get all user_ids of an email address. More...
 
static getUserLoginsByEmail ($a_email)
 get all user login names of an email address More...
 
static searchUsers ($a_search_str, $active=1, $a_return_ids_only=false, $filter_settings=false)
 STATIC METHOD get the user_ids which correspond a search string. More...
 
static _readUsersProfileData ($a_user_ids)
 STATIC METHOD get user data of selected users. More...
 
static _getAllUserData ($a_fields=null, $active=-1)
 STATIC METHOD get all user data. More...
 
static _getNumberOfUsersForStyle ($a_skin, $a_style)
 skins and styles More...
 
static _getAllUserAssignedStyles ()
 skins and styles More...
 
static _moveUsersToStyle ($a_from_skin, $a_from_style, $a_to_skin, $a_to_style)
 skins and styles More...
 
static _getUsersForClipboadObject ($a_type, $a_id)
 get all users, that have a certain object within their clipboard More...
 
static _getImportedUserId ($i2_id)
 
static lookupOrgUnitsRepresentation ($a_usr_id)
 lokup org unit representation More...
 
static _getExternalAccountsByAuthMode ($a_auth_mode, $a_read_auth_default=false)
 Get list of external account by authentication method Note: If login == ext_account for two user with auth_mode 'default' and auth_mode 'ldap' The ldap auth mode chosen. More...
 
static _toggleActiveStatusOfUsers ($a_usr_ids, $a_status)
 Toggle active status of users. More...
 
static _lookupAuthMode ($a_usr_id)
 lookup auth mode More...
 
static _checkExternalAuthAccount ($a_auth, $a_account, $tryFallback=true)
 check whether external account and authentication method matches with a user More...
 
static _getNumberOfUsersPerAuthMode ()
 get number of users per auth mode More...
 
static _getLocalAccountsForEmail ($a_email)
 check whether external account and authentication method matches with a user More...
 
static _uploadPersonalPicture ($tmp_file, $obj_id)
 Create a personal picture image file from a temporary image file. More...
 
static _getAvatar ($a_usr_id)
 
static _getPersonalPicturePath ( $a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false, $html_export=false)
 Get path to personal picture. More...
 
static copyProfilePicturesToDirectory ($a_user_id, $a_dir)
 Get profile picture direcotory. More...
 
static _lookupFeedHash ($a_user_id, $a_create=false)
 Lookup news feed hash for user. More...
 
static _getFeedPass ($a_user_id)
 Lookup news feed password for user. More...
 
static _setFeedPass ($a_user_id, $a_password)
 Set news feed password for user. More...
 
static _loginExists ($a_login, $a_user_id=0)
 check if a login name already exists You may exclude a user from the check by giving his user id as 2nd paramter public static More...
 
static _externalAccountExists ($a_external_account, $a_auth_mode)
 Check if an external account name already exists. More...
 
static _getUsersForRole ($role_id, $active=-1)
 return array of complete users which belong to a specific role More...
 
static _getUsersForFolder ($ref_id, $active)
 get users for a category or from system folder More...
 
static _getUsersForGroup ($a_mem_ids, $active=-1)
 return user data for group members More...
 
static _getUsersForIds ($a_mem_ids, $active=-1, $timelimitowner=-1)
 return user data for given user id More...
 
static _getUserData ($a_internalids)
 return user data for given user ids More...
 
static _getPreferences ($user_id)
 get preferences for user More...
 
static getUserSubsetByPreferenceValue ($a_user_ids, $a_keyword, $a_val)
 For a given set of user IDs return a subset that has a given user preference set. More...
 
static _resetLoginAttempts ($a_usr_id)
 
static _getLoginAttempts ($a_usr_id)
 
static _incrementLoginAttempts ($a_usr_id)
 
static _setUserInactive ($a_usr_id)
 
static _writeHistory ($a_usr_id, $a_login)
 
static _generateRegistrationHash ($a_usr_id)
 Generates a unique hashcode for activating a user profile after registration. More...
 
static _verifyRegistrationHash ($a_hash)
 Verifies a registration hash. More...
 
static getUserIdsByInactivityPeriod (int $periodInDays)
 Get ids of all users that have been inactive for at least the given period. More...
 
static getUserIdsNeverLoggedIn (int $thresholdInDays)
 Get ids of all users that have never logged in. More...
 
static _getUserIdsByInactivationPeriod ($period)
 get ids of all users that have been inactivated since at least the given period More...
 
static _updateLastLogin ($a_usr_id, $a_last_login=null)
 STATIC METHOD updates the last_login field of user with given id to given or current date. More...
 
static getFirstLettersOfLastnames (?array $user_ids=null)
 Get first letters of all lastnames. More...
 
static userExists ($a_usr_ids=array())
 
static getUsersAgreed ($a_agreed=true, $a_users=null)
 Get users that have or have not agreed to the user agreement. More...
 
static _isAnonymous ($usr_id)
 
static findInterests ($a_term, $a_user_id=null, $a_field_id=null)
 
static getProfileStatusOfUsers ($a_user_ids)
 Get profile status. More...
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId ($a_import_id)
 
static _lookupImportId ($a_obj_id)
 
static _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id More...
 
static _getIdForImportId ($a_import_id)
 get current object id for import id (static) More...
 
static _getAllReferences ($a_id)
 get all reference ids of object More...
 
static _lookupTitle ($a_id)
 lookup object title More...
 
static lookupOfflineStatus ($a_obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner ($a_id)
 lookup object owner More...
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 lookup object description More...
 
static _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update More...
 
static _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects. More...
 
static _lookupObjId ($a_id)
 
static _setDeletedDate ($a_ref_id, $a_deleted_by)
 
static setDeletedDates ($a_ref_ids, $a_user_id)
 Set deleted date. More...
 
static _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _writeTitle ($a_obj_id, $a_title)
 write title to db (static) More...
 
static _writeDescription ($a_obj_id, $a_desc)
 write description to db (static) More...
 
static _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static) More...
 
static _lookupType ($a_id, $a_reference=false)
 lookup object type More...
 
static _isInTrash ($a_ref_id)
 checks wether object is in trash More...
 
static _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash More...
 
static _lookupObjectId ($a_ref_id)
 lookup object id More...
 
static _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type More...
 
static _exists ($a_id, $a_reference=false, $a_type=null)
 checks if an object exists in object_data More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection. More...
 
static _getIcon ( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $a_obj_ids)
 Get long description data. More...
 
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns. More...
 
static fixMissingTitles ($a_type, array &$a_obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate ($a_id)
 Lookup creation date. More...
 
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course. More...
 

Data Fields

 $login
 all user related data in single vars public More...
 
 $gender
 
 $utitle
 
 $firstname
 
 $lastname
 
 $fullname
 
 $institution
 
 $department
 
 $street
 
 $city
 
 $zipcode
 
 $country
 
 $sel_country
 
 $phone_office
 
 $phone_home
 
 $phone_mobile
 
 $fax
 
 $email
 
 $hobby
 
 $matriculation
 
 $referral_comment
 
 $approve_date = null
 
 $agree_date = null
 
 $active
 
 $client_ip
 
 $auth_mode
 
 $latitude
 
 $longitude
 
 $loc_zoom
 
 $last_password_change_ts
 
 $login_attempts
 
 $user_defined_data = array()
 
 $prefs
 
 $skin
 
 $default_role
 
 $ilias
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 max length of object title More...
 
const DESC_LENGTH = 128
 
 $lng
 
 $id
 
 $ref_id
 
 $type
 
 $title
 
 $untranslatedTitle
 
 $desc
 
 $long_desc
 
 $owner
 
 $create_date
 
 $last_update
 
 $import_id
 
 $register = false
 
 $referenced
 
 $objectList
 
 $max_title
 
 $max_desc
 
 $add_dots
 

Static Public Attributes

static $is_desktop_item_loaded
 
static $is_desktop_item_cache
 

Protected Member Functions

 buildTextFromArray ($a_attr)
 Convert multi-text values to plain text. More...
 
 readMultiTextFields ()
 Fetch multi-text values from DB. More...
 
 deleteMultiTextFields ()
 Remove multi-text values from DB. More...
 

Protected Attributes

 $passwd
 
 $passwd_type
 
 $password_encoding_type
 
 $password_salt = null
 
 $birthday
 
 $second_email = null
 
 $passwd_policy_reset = false
 
 $inactivation_date = null
 
 $org_units
 
 $interests_general
 
 $interests_help_offered
 
 $interests_help_looking
 
 $last_profile_prompt
 
 $first_login
 
- Protected Attributes inherited from ilObject
 $objDefinition
 
 $db
 
 $log
 
 $error
 
 $tree
 
 $app_event_handler
 
 $rbacadmin
 
 $rbacreview
 

Static Protected Attributes

static $personal_image_cache = array()
 

Static Private Member Functions

static _lookup ($a_user_id, $a_field)
 Private function for lookup methods. More...
 
static getLoginFromAuth ()
 Gets the username from $ilAuth, and converts it into an ILIAS login name. More...
 
static initInactivationDate ($usrIds)
 type $ilDB More...
 
static resetInactivationDate ($usrIds)
 type $ilDB More...
 

Private Attributes

 $is_self_registered = false
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor public.

Parameters
integeruser_id

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

References $DIC, $ilDB, $ilias, $skin, ILIAS\GlobalScreen\Provider\__construct(), IL_PASSWD_PLAIN, read(), and ilObject\setId().

190  {
191  global $DIC;
192 
193  $ilias = $DIC['ilias'];
194  $ilDB = $DIC['ilDB'];
195 
196  // init variables
197  $this->ilias = &$ilias;
198  $this->db = &$ilDB;
199 
200  $this->type = "usr";
201  parent::__construct($a_user_id, $a_call_by_reference);
202  $this->auth_mode = "default";
203  $this->passwd_type = IL_PASSWD_PLAIN;
204 
205  // for gender selection. don't change this
206  /*$this->gender = array(
207  'n' => "salutation_n",
208  'm' => "salutation_m",
209  'f' => "salutation_f"
210  );*/
211  if ($a_user_id > 0) {
212  $this->setId($a_user_id);
213  $this->read();
214  } else {
215  // TODO: all code in else-structure doesn't belongs in class user !!!
216  //load default data
217  $this->prefs = array();
218  //language
219  $this->prefs["language"] = $this->ilias->ini->readVariable("language", "default");
220 
221  //skin and pda support
222  $this->skin = $this->ilias->ini->readVariable("layout", "skin");
223 
224  $this->prefs["skin"] = $this->skin;
225  // $this->prefs["show_users_online"] = "y";
226 
227  //style (css)
228  $this->prefs["style"] = $this->ilias->ini->readVariable("layout", "style");
229  }
230  }
const IL_PASSWD_PLAIN
setId($a_id)
set object id public
read()
loads a record "user" from database private
global $DIC
Definition: goto.php:24
redirection script todo: (a better solution should control the processing via a xml file) ...
__construct(Container $dic, ilPlugin $plugin)
global $ilDB
+ Here is the call graph for this function:

Member Function Documentation

◆ _checkExternalAuthAccount()

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

check whether external account and authentication method matches with a user

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

References ilObject\$db, $GLOBALS, $res, and ilAuthUtils\_getAuthModeName().

Referenced by ilAuthProviderApache\doAuthentication(), ilAuthProviderCAS\doAuthentication(), ilAuthProviderRadius\doAuthentication(), ilLTIAppEventListener\doCronUpdate(), ilAuthProviderLTI\findUserId(), ilAuthProviderSaml\handleSamlAuth(), ilAuthProviderSoap\handleSoapAuth(), ilAuthProviderOpenIdConnect\handleUpdate(), ilUserImportParser\importEndTag(), ilLDAPUserSynchronisation\readInternalAccount(), ilLDAPQuery\readUserData(), ilECSCmsCourseMemberCommandQueueHandler\refreshAssignmentStatus(), ilObjUserTest\testAuthAndEmailMethods(), ilOpenIdConnectUserSync\updateUser(), and ilUserImportParser\verifyEndTag().

3569  {
3570  $db = $GLOBALS['DIC']->database();
3571  $settings = $GLOBALS['DIC']->settings();
3572 
3573  // Check directly with auth_mode
3574  $r = $db->queryF(
3575  "SELECT * FROM usr_data WHERE " .
3576  " ext_account = %s AND auth_mode = %s",
3577  array("text", "text"),
3578  array($a_account, $a_auth)
3579  );
3580  if ($usr = $db->fetchAssoc($r)) {
3581  return $usr["login"];
3582  }
3583 
3584  if (!$tryFallback) {
3585  return false;
3586  }
3587 
3588  // For compatibility, check for login (no ext_account entry given)
3589  $res = $db->queryF(
3590  "SELECT login FROM usr_data " .
3591  "WHERE login = %s AND auth_mode = %s AND (ext_account IS NULL OR ext_account = '') ",
3592  array("text", "text"),
3593  array($a_account, $a_auth)
3594  );
3595  if ($usr = $db->fetchAssoc($res)) {
3596  return $usr['login'];
3597  }
3598 
3599  // If auth_default == $a_auth => check for login
3600  if (ilAuthUtils::_getAuthModeName($settings->get('auth_mode')) == $a_auth) {
3601  $res = $db->queryF(
3602  "SELECT login FROM usr_data WHERE " .
3603  " ext_account = %s AND auth_mode = %s",
3604  array("text", "text"),
3605  array($a_account, "default")
3606  );
3607  if ($usr = $db->fetchAssoc($res)) {
3608  return $usr["login"];
3609  }
3610  // Search for login (no ext_account given)
3611  $res = $db->queryF(
3612  "SELECT login FROM usr_data " .
3613  "WHERE login = %s AND (ext_account IS NULL OR ext_account = '') AND auth_mode = %s",
3614  array("text", "text"),
3615  array($a_account, "default")
3616  );
3617  if ($usr = $db->fetchAssoc($res)) {
3618  return $usr["login"];
3619  }
3620  }
3621  return false;
3622  }
static _getAuthModeName($a_auth_key)
foreach($_POST as $key=> $value) $res
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _deleteAllPref()

static ilObjUser::_deleteAllPref (   $a_user_id)
static

Deletes a userpref value of the user from the database public.

Parameters
stringkeyword

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

References $DIC, and $ilDB.

Referenced by delete(), and writePrefs().

1141  {
1142  global $DIC;
1143 
1144  $ilDB = $DIC['ilDB'];
1145 
1146  $ilDB->manipulateF(
1147  "DELETE FROM usr_pref WHERE usr_id = %s",
1148  array("integer"),
1149  array($a_user_id)
1150  );
1151  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _doesLoginnameExistInHistory()

static ilObjUser::_doesLoginnameExistInHistory (   $a_login)
static

Checks wether the passed loginname already exists in history.

public

Parameters
string$a_loginLoginname
Returns
boolean true or false

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

References $DIC, $ilDB, and $res.

Referenced by ilAccountRegistrationGUI\saveForm().

960  {
961  global $DIC;
962 
963  $ilDB = $DIC['ilDB'];
964 
965  $res = $ilDB->queryF(
966  '
967  SELECT * FROM loginname_history
968  WHERE login = %s',
969  array('text'),
970  array($a_login)
971  );
972 
973  return $ilDB->fetchAssoc($res) ? true : false;
974  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _externalAccountExists()

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

Check if an external account name already exists.

public

Parameters
stringexternal account
stringauth mode

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

References $DIC, $ilDB, and $res.

Referenced by ilObjUserTest\testAuthAndEmailMethods().

4222  {
4223  global $DIC;
4224 
4225  $ilDB = $DIC['ilDB'];
4226 
4227  $res = $ilDB->queryF(
4228  "SELECT * FROM usr_data " .
4229  "WHERE ext_account = %s AND auth_mode = %s",
4230  array("text", "text"),
4231  array($a_external_account, $a_auth_mode)
4232  );
4233  return $ilDB->fetchAssoc($res) ? true :false;
4234  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _generateRegistrationHash()

static ilObjUser::_generateRegistrationHash (   $a_usr_id)
static

Generates a unique hashcode for activating a user profile after registration.

Parameters
integer$a_usr_iduser id of the current user
Returns
string generated hashcode

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

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

Referenced by ilRegistrationMimeMailNotification\__construct().

4697  {
4698  global $DIC;
4699 
4700  $ilDB = $DIC['ilDB'];
4701 
4702  do {
4703  $continue = false;
4704 
4705  $hashcode = substr(md5(uniqid(rand(), true)), 0, 16);
4706 
4707  $res = $ilDB->queryf(
4708  '
4709  SELECT COUNT(usr_id) cnt FROM usr_data
4710  WHERE reg_hash = %s',
4711  array('text'),
4712  array($hashcode)
4713  );
4714  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
4715  if ($row->cnt > 0) {
4716  $continue = true;
4717  }
4718  break;
4719  }
4720 
4721  if ($continue) {
4722  continue;
4723  }
4724 
4725  $ilDB->manipulateF(
4726  '
4727  UPDATE usr_data
4728  SET reg_hash = %s
4729  WHERE usr_id = %s',
4730  array('text', 'integer'),
4731  array($hashcode, (int) $a_usr_id)
4732  );
4733 
4734  break;
4735  } while (true);
4736 
4737  return $hashcode;
4738  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _getAllUserAssignedStyles()

static ilObjUser::_getAllUserAssignedStyles ( )
static

skins and styles

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

References $DIC, and $ilDB.

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

3063  {
3064  global $DIC;
3065 
3066  $ilDB = $DIC['ilDB'];
3067 
3068  $q = "SELECT DISTINCT up1.value style, up2.value skin FROM usr_pref up1, usr_pref up2 " .
3069  " WHERE up1.keyword = " . $ilDB->quote("style", "text") .
3070  " AND up2.keyword = " . $ilDB->quote("skin", "text") .
3071  " AND up1.usr_id = up2.usr_id";
3072 
3073  $sty_set = $ilDB->query($q);
3074 
3075  $styles = array();
3076  while ($sty_rec = $ilDB->fetchAssoc($sty_set)) {
3077  $styles[] = $sty_rec["skin"] . ":" . $sty_rec["style"];
3078  }
3079 
3080  return $styles;
3081  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _getAllUserData()

static ilObjUser::_getAllUserData (   $a_fields = null,
  $active = -1 
)
static

STATIC METHOD get all user data.

Parameters
arraydesired columns
Returns
array of user data public

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

References $_SESSION, $active, $DIC, $ilDB, ilObject\$rbacreview, and ilObject\$ref_id.

Referenced by ilLocalUser\_getUserData(), and ilObjUserTest\testSearch().

2939  {
2940  global $DIC;
2941 
2942  $ilDB = $DIC['ilDB'];
2943 
2944  $result_arr = array();
2945  $types = array();
2946  $values = array();
2947 
2948  if ($a_fields !== null and is_array($a_fields)) {
2949  if (count($a_fields) == 0) {
2950  $select = "*";
2951  } else {
2952  if (($usr_id_field = array_search("usr_id", $a_fields)) !== false) {
2953  unset($a_fields[$usr_id_field]);
2954  }
2955 
2956  $select = implode(",", $a_fields) . ",usr_data.usr_id";
2957  // online time
2958  if (in_array('online_time', $a_fields)) {
2959  $select .= ",ut_online.online_time ";
2960  }
2961  }
2962 
2963  $q = "SELECT " . $select . " FROM usr_data ";
2964 
2965  // Add online_time if desired
2966  // Need left join here to show users that never logged in
2967  if (in_array('online_time', $a_fields)) {
2968  $q .= "LEFT JOIN ut_online ON usr_data.usr_id = ut_online.usr_id ";
2969  }
2970 
2971  switch ($active) {
2972  case 0:
2973  case 1:
2974  $q .= "WHERE active = " . $ilDB->quote($active, "integer");
2975  break;
2976  case 2:
2977  $q .= "WHERE time_limit_unlimited= " . $ilDB->quote(0, "integer");;
2978  break;
2979  case 3:
2980  $qtemp = $q . ", rbac_ua, object_data WHERE rbac_ua.rol_id = object_data.obj_id AND " .
2981  $ilDB->like("object_data.title", "text", "%crs%") . " AND usr_data.usr_id = rbac_ua.usr_id";
2982  $r = $ilDB->query($qtemp);
2983  $course_users = array();
2984  while ($row = $ilDB->fetchAssoc($r)) {
2985  array_push($course_users, $row["usr_id"]);
2986  }
2987  if (count($course_users)) {
2988  $q .= " WHERE " . $ilDB->in("usr_data.usr_id", $course_users, true, "integer") . " ";
2989  } else {
2990  return $result_arr;
2991  }
2992  break;
2993  case 4:
2994  $date = strftime("%Y-%m-%d %H:%I:%S", mktime(0, 0, 0, $_SESSION["user_filter_data"]["m"], $_SESSION["user_filter_data"]["d"], $_SESSION["user_filter_data"]["y"]));
2995  $q .= " AND last_login < " . $ilDB->quote($date, "timestamp");
2996  break;
2997  case 5:
2998  $ref_id = $_SESSION["user_filter_data"];
2999  if ($ref_id) {
3000  $q .= " LEFT JOIN obj_members ON usr_data.usr_id = obj_members.usr_id " .
3001  "WHERE obj_members.obj_id = (SELECT obj_id FROM object_reference " .
3002  "WHERE ref_id = " . $ilDB->quote($ref_id, "integer") . ") ";
3003  }
3004  break;
3005  case 6:
3006  global $DIC;
3007 
3008  $rbacreview = $DIC['rbacreview'];
3009  $ref_id = $_SESSION["user_filter_data"];
3010  if ($ref_id) {
3011  $local_roles = $rbacreview->getRolesOfRoleFolder($ref_id, false);
3012  if (is_array($local_roles) && count($local_roles)) {
3013  $q .= " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE " .
3014  $ilDB->in("rbac_ua.rol_id", $local_roles, false, "integer") . " ";
3015  }
3016  }
3017  break;
3018  case 7:
3019  $rol_id = $_SESSION["user_filter_data"];
3020  if ($rol_id) {
3021  $q .= " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE rbac_ua.rol_id = " .
3022  $ilDB->quote($rol_id, "integer");
3023  }
3024  break;
3025  }
3026  $r = $ilDB->query($q);
3027 
3028  while ($row = $ilDB->fetchAssoc($r)) {
3029  $result_arr[] = $row;
3030  }
3031  }
3032 
3033  return $result_arr;
3034  }
$_SESSION["AccountId"]
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _getAvatar()

static ilObjUser::_getAvatar (   $a_usr_id)
static

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

References ANONYMOUS_USER_ID.

3745  : Avatar
3746  {
3747  $define = new ilUserAvatarResolver((int) ($a_usr_id ? $a_usr_id : ANONYMOUS_USER_ID));
3748 
3749  return $define->getAvatar();
3750  }
const ANONYMOUS_USER_ID
Definition: constants.php:25
This describes how a letter or a picture avatar could be modified during construction of UI...
Definition: Avatar.php:8
Class ilUserAvatarResolver.

◆ _getExternalAccountsByAuthMode()

static ilObjUser::_getExternalAccountsByAuthMode (   $a_auth_mode,
  $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.

public

Parameters
stringauth_mode
boolalso get users with authentication method 'default'
Returns
array of external account names

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

References $DIC, $ilDB, $ilSetting, $res, ilAuthUtils\_getAuthModeName(), and AUTH_LOCAL.

Referenced by ilLDAPCronSynchronization\deactivateUsers(), ilLDAPServerTableGUI\fillRow(), ilLDAPRoleGroupMapping\initServers(), and ilObjUserTest\testAuthAndEmailMethods().

3480  {
3481  global $DIC;
3482 
3483  $ilDB = $DIC['ilDB'];
3484  $ilSetting = $DIC['ilSetting'];
3485 
3486  include_once('./Services/Authentication/classes/class.ilAuthUtils.php');
3487  $q = "SELECT login,usr_id,ext_account,auth_mode FROM usr_data " .
3488  "WHERE auth_mode = %s";
3489  $types[] = "text";
3490  $values[] = $a_auth_mode;
3491  if ($a_read_auth_default and ilAuthUtils::_getAuthModeName($ilSetting->get('auth_mode', AUTH_LOCAL)) == $a_auth_mode) {
3492  $q .= " OR auth_mode = %s ";
3493  $types[] = "text";
3494  $values[] = 'default';
3495  }
3496 
3497  $res = $ilDB->queryF($q, $types, $values);
3498  while ($row = $ilDB->fetchObject($res)) {
3499  if ($row->auth_mode == 'default') {
3500  $accounts[$row->usr_id] = $row->login;
3501  } else {
3502  $accounts[$row->usr_id] = $row->ext_account;
3503  }
3504  }
3505  return $accounts ? $accounts : array();
3506  }
static _getAuthModeName($a_auth_key)
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
const AUTH_LOCAL
global $ilSetting
Definition: privfeed.php:17
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getFeedPass()

static ilObjUser::_getFeedPass (   $a_user_id)
static

Lookup news feed password for user.

Parameters
integeruser_id
Returns
string feed_password md5-encoded, or false

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

References $DIC, $ilDB, and _lookupPref().

4148  {
4149  global $DIC;
4150 
4151  $ilDB = $DIC['ilDB'];
4152 
4153  if ($a_user_id > 0) {
4154  return ilObjUser::_lookupPref($a_user_id, "priv_feed_pass");
4155  }
4156  return false;
4157  }
global $DIC
Definition: goto.php:24
static _lookupPref($a_usr_id, $a_keyword)
global $ilDB
+ Here is the call graph for this function:

◆ _getImportedUserId()

static ilObjUser::_getImportedUserId (   $i2_id)
static

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

References $DIC, ilObject\$id, $ilDB, $query, and $res.

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

3385  {
3386  global $DIC;
3387 
3388  $ilDB = $DIC['ilDB'];
3389 
3390  $query = "SELECT obj_id FROM object_data WHERE import_id = " .
3391  $ilDB->quote($i2_id, "text");
3392 
3393  $res = $ilDB->query($query);
3394  while ($row = $ilDB->fetchObject($res)) {
3395  $id = $row->obj_id;
3396  }
3397  return $id ? $id : 0;
3398  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the caller graph for this function:

◆ _getLastHistoryDataByUserId()

static ilObjUser::_getLastHistoryDataByUserId (   $a_usr_id)
static

Returns the last used loginname and the changedate of the passed user_id.

Throws an ilUserException in case no entry could be found.

public

Parameters
string$a_usr_idA user id
Returns
array Associative array, first index is the loginname, second index a unix_timestamp
Exceptions
ilUserException

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

References $DIC, $ilDB, and $res.

Referenced by ilObjUserGUI\getValues(), and updateLogin().

989  {
990  global $DIC;
991 
992  $ilDB = $DIC['ilDB'];
993 
994  $ilDB->setLimit(1, 0);
995  $res = $ilDB->queryF(
996  '
997  SELECT login, history_date FROM loginname_history
998  WHERE usr_id = %s ORDER BY history_date DESC',
999  array('integer'),
1000  array($a_usr_id)
1001  );
1002  $row = $ilDB->fetchAssoc($res);
1003  if (!is_array($row) || !count($row)) {
1004  throw new ilUserException('');
1005  }
1006 
1007  return array(
1008  $row['login'], $row['history_date']
1009  );
1010  }
Class for user related exception handling in ILIAS.
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _getLocalAccountsForEmail()

static ilObjUser::_getLocalAccountsForEmail (   $a_email)
static

check whether external account and authentication method matches with a user

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

References $DIC, $ilDB, and $ilSetting.

Referenced by ilObjUserTest\testAuthAndEmailMethods().

3649  {
3650  global $DIC;
3651 
3652  $ilDB = $DIC['ilDB'];
3653  $ilSetting = $DIC['ilSetting'];
3654 
3655  // default set to local (1)?
3656 
3657  $q = "SELECT * FROM usr_data WHERE " .
3658  " email = %s AND (auth_mode = %s ";
3659  $types = array("text", "text");
3660  $values = array($a_email, "local");
3661 
3662  if ($ilSetting->get("auth_mode") == 1) {
3663  $q .= " OR auth_mode = %s";
3664  $types[] = "text";
3665  $values[] = "default";
3666  }
3667 
3668  $q .= ")";
3669 
3670  $users = array();
3671  $usr_set = $ilDB->queryF($q, $types, $values);
3672  while ($usr_rec = $ilDB->fetchAssoc($usr_set)) {
3673  $users[$usr_rec["usr_id"]] = $usr_rec["login"];
3674  }
3675 
3676  return $users;
3677  }
global $DIC
Definition: goto.php:24
global $ilSetting
Definition: privfeed.php:17
global $ilDB
+ Here is the caller graph for this function:

◆ _getLoginAttempts()

static ilObjUser::_getLoginAttempts (   $a_usr_id)
static

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

References $DIC, $ilDB, $login_attempts, $query, and $result.

Referenced by ilAuthFrontend\checkExceededLoginAttempts(), ilAuthFrontend\handleAuthenticationFail(), and ilObjUserTest\testAuthAndEmailMethods().

4502  {
4503  global $DIC;
4504 
4505  $ilDB = $DIC['ilDB'];
4506 
4507  $query = "SELECT login_attempts FROM usr_data WHERE usr_id = %s";
4508  $result = $ilDB->queryF($query, array('integer'), array($a_usr_id));
4509  $record = $ilDB->fetchAssoc($result);
4510  $login_attempts = $record['login_attempts'];
4511 
4512  return $login_attempts;
4513  }
$result
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the caller graph for this function:

◆ _getNumberOfUsersForStyle()

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

skins and styles

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

References $DIC, and $ilDB.

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

3040  {
3041  global $DIC;
3042 
3043  $ilDB = $DIC['ilDB'];
3044 
3045  $q = "SELECT count(*) as cnt FROM usr_pref up1, usr_pref up2 " .
3046  " WHERE up1.keyword= " . $ilDB->quote("style", "text") .
3047  " AND up1.value= " . $ilDB->quote($a_style, "text") .
3048  " AND up2.keyword= " . $ilDB->quote("skin", "text") .
3049  " AND up2.value= " . $ilDB->quote($a_skin, "text") .
3050  " AND up1.usr_id = up2.usr_id ";
3051 
3052  $cnt_set = $ilDB->query($q);
3053 
3054  $cnt_rec = $ilDB->fetchAssoc($cnt_set);
3055 
3056  return $cnt_rec["cnt"];
3057  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _getNumberOfUsersPerAuthMode()

static ilObjUser::_getNumberOfUsersPerAuthMode ( )
static

get number of users per auth mode

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

References $DIC, and $ilDB.

Referenced by ilObjAuthSettingsGUI\authSettingsObject(), and ilObjUserTest\testAuthAndEmailMethods().

3628  {
3629  global $DIC;
3630 
3631  $ilDB = $DIC['ilDB'];
3632 
3633  $r = $ilDB->query("SELECT count(*) AS cnt, auth_mode FROM usr_data " .
3634  "GROUP BY auth_mode");
3635  $cnt_arr = array();
3636  while ($cnt = $ilDB->fetchAssoc($r)) {
3637  $cnt_arr[$cnt["auth_mode"]] = $cnt["cnt"];
3638  }
3639 
3640  return $cnt_arr;
3641  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _getPersonalPicturePath()

static ilObjUser::_getPersonalPicturePath (   $a_usr_id,
  $a_size = "small",
  $a_force_pic = false,
  $a_prevent_no_photo_image = false,
  $html_export = false 
)
static

Get path to personal picture.

Parameters
$a_usr_id
string$a_size"small", "xsmall" or "xxsmall"
bool$a_force_pic
bool$a_prevent_no_photo_image
Returns
string
Exceptions
ilWACException

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

References ilWACSignedPath\signFile().

Referenced by ilUserProfile\addStandardFieldsToForm(), ilUserProfileBadge\evaluate(), ilWikiContributorsTableGUI\fillRow(), ilAwarenessData\getData(), ilPublicUserProfileGUI\getEmbeddable(), ilUserUtil\getNamePresentation(), ilNoteGUI\getNoteListHTML(), getPersonalPicturePath(), ilInternalLinkGUI\getUserSearchResult(), ilObjUserGUI\getValues(), ilUserDataSet\getXmlRecord(), ilRepositoryUserResultTableGUI\initMultiCommands(), ilNewsTimelineItemGUI\render(), ilObjPortfolioBaseGUI\renderFullscreenHeader(), ilObjBlogGUI\renderFullscreenHeader(), ilLikeGUI\renderModal(), ilPublicUserProfileGUI\renderTitle(), ilMStShowUserGUI\setTitleAndIcon(), and ilPersonalProfileGUI\showPublicProfileFields().

3769  {
3770  $define = new ilUserAvatarResolver((int) $a_usr_id);
3771  $define->setForcePicture($a_force_pic);
3772  $define->setSize($a_size);
3773 
3774  return ilWACSignedPath::signFile($define->getLegacyPictureURL());
3775  }
static signFile($path_to_file)
Class ilUserAvatarResolver.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getPreferences()

static ilObjUser::_getPreferences (   $user_id)
static

get preferences for user

Parameters
int$user_id
Returns
array of keys (pref_keys) and values

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

References $DIC, $ilDB, and $prefs.

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

4436  {
4437  global $DIC;
4438 
4439  $ilDB = $DIC['ilDB'];
4440 
4441  $prefs = array();
4442 
4443  $r = $ilDB->queryF(
4444  "SELECT * FROM usr_pref WHERE usr_id = %s",
4445  array("integer"),
4446  array($user_id)
4447  );
4448 
4449  while ($row = $ilDB->fetchAssoc($r)) {
4450  $prefs[$row["keyword"]] = $row["value"];
4451  }
4452 
4453  return $prefs;
4454  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _getUserData()

static ilObjUser::_getUserData (   $a_internalids)
static

return user data for given user ids

Parameters
arrayof internal ids or numerics $a_internalids

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

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

Referenced by ilSoapUserAdministration\getUserXML(), and ilObjSurvey\sendNotificationMail().

4389  {
4390  global $DIC;
4391 
4392  $ilDB = $DIC['ilDB'];
4393 
4394  $ids = array();
4395  if (is_array($a_internalids)) {
4396  foreach ($a_internalids as $internalid) {
4397  if (is_numeric($internalid)) {
4398  $ids[] = $internalid;
4399  } else {
4400  $parsedid = ilUtil::__extractId($internalid, IL_INST_ID);
4401  if (is_numeric($parsedid) && $parsedid > 0) {
4402  $ids[] = $parsedid;
4403  }
4404  }
4405  }
4406  }
4407  if (count($ids) == 0) {
4408  $ids [] = -1;
4409  }
4410 
4411  $query = "SELECT usr_data.*, usr_pref.value AS language
4412  FROM usr_data
4413  LEFT JOIN usr_pref
4414  ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
4415  WHERE " . $ilDB->in("usr_data.usr_id", $ids, false, "integer");
4416  $values[] = "language";
4417  $types[] = "text";
4418 
4419  $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4420 
4421  $data = array();
4422  $result = $ilDB->queryF($query, $types, $values);
4423  while ($row = $ilDB->fetchAssoc($result)) {
4424  $data[] = $row;
4425  }
4426  return $data;
4427  }
$data
Definition: storeScorm.php:23
const IL_INST_ID
Definition: constants.php:38
$result
global $DIC
Definition: goto.php:24
$query
global $ilDB
static __extractId($ilias_id, $inst_id)
extract ref id from role title, e.g.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getUserIdsByInactivationPeriod()

static ilObjUser::_getUserIdsByInactivationPeriod (   $period)
static

get ids of all users that have been inactivated since at least the given period

Parameters
integer$period(in days)
Returns
array of user ids public

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

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

Referenced by ilCronDeleteInactivatedUserAccounts\run().

4869  {
4871  $field = 'inactivation_date';
4873 
4874  if (!(int) $period) {
4875  throw new ilException('no valid period given');
4876  }
4877 
4878  global $DIC;
4879 
4880  $ilDB = $DIC['ilDB'];
4881 
4882  $date = date('Y-m-d H:i:s', (time() - ((int) $period * 24 * 60 * 60)));
4883 
4884  $query = "SELECT usr_id FROM usr_data WHERE $field < %s AND active = %s";
4885 
4886  $res = $ilDB->queryF($query, array('timestamp', 'integer'), array($date, 0));
4887 
4888  $ids = array();
4889  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
4890  $ids[] = $row->usr_id;
4891  }
4892 
4893  return $ids;
4894  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the caller graph for this function:

◆ _getUsersForClipboadObject()

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

get all users, that have a certain object within their clipboard

Parameters
string$a_typeobject type
string$a_typeobject type
Returns
array array of user IDs

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

References $DIC, and $ilDB.

Referenced by ilObjMediaObject\lookupUsages(), and ilObjUserTest\testClipboard().

3347  {
3348  global $DIC;
3349 
3350  $ilDB = $DIC['ilDB'];
3351 
3352  $q = "SELECT DISTINCT user_id FROM personal_clipboard WHERE " .
3353  "item_id = " . $ilDB->quote($a_id, "integer") . " AND " .
3354  "type = " . $ilDB->quote($a_type, "text");
3355  $user_set = $ilDB->query($q);
3356  $users = array();
3357  while ($user_rec = $ilDB->fetchAssoc($user_set)) {
3358  $users[] = $user_rec["user_id"];
3359  }
3360 
3361  return $users;
3362  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _getUsersForFolder()

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

get users for a category or from system folder

Parameters
$ref_idref id of object
$activecan be -1 (ignore), 1 = active, 0 = not active user

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

References $active, $data, $DIC, $ilDB, $query, ilObject\$ref_id, $result, ANONYMOUS_USER_ID, and USER_FOLDER_ID.

Referenced by ilSoapUserAdministration\getUsersForContainer().

4288  {
4289  global $DIC;
4290 
4291  $ilDB = $DIC['ilDB'];
4292  $data = array();
4293  $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 ";
4294  $types[] = "text";
4295  $values[] = "language";
4296 
4297  if (is_numeric($active) && $active > -1) {
4298  $query .= " AND usr_data.active = %s";
4299  $values[] = $active;
4300  $types[] = "integer";
4301  }
4302 
4303  if ($ref_id != USER_FOLDER_ID) {
4304  $query .= " AND usr_data.time_limit_owner = %s";
4305  $values[] = $ref_id;
4306  $types[] = "integer";
4307  }
4308 
4309  $query .= " AND usr_data.usr_id != %s ";
4310  $values[] = ANONYMOUS_USER_ID;
4311  $types[] = "integer";
4312 
4313  $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4314 
4315  $result = $ilDB->queryF($query, $types, $values);
4316  $data = array();
4317  while ($row = $ilDB->fetchAssoc($result)) {
4318  array_push($data, $row);
4319  }
4320 
4321  return $data;
4322  }
$data
Definition: storeScorm.php:23
const ANONYMOUS_USER_ID
Definition: constants.php:25
const USER_FOLDER_ID
Definition: constants.php:31
$result
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the caller graph for this function:

◆ _getUsersForGroup()

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

return user data for group members

Parameters
intarray of member ids
intactive can be -1 (ignore), 1 = active, 0 = not active user

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

References $active, and _getUsersForIds().

Referenced by ilSoapUserAdministration\getUsersForContainer().

4331  {
4332  return ilObjUser::_getUsersForIds($a_mem_ids, $active);
4333  }
static _getUsersForIds($a_mem_ids, $active=-1, $timelimitowner=-1)
return user data for given user id
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getUsersForIds()

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

return user data for given user id

Parameters
intarray of member ids
intactive can be -1 (ignore), 1 = active, 0 = not active user

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

References $active, $DIC, $ilDB, $query, ilObject\$rbacadmin, ilObject\$rbacreview, $result, ANONYMOUS_USER_ID, and USER_FOLDER_ID.

Referenced by _getUsersForGroup(), and ilSoapUserAdministration\getUsersForContainer().

4342  {
4343  global $DIC;
4344 
4345  $rbacadmin = $DIC['rbacadmin'];
4346  $rbacreview = $DIC['rbacreview'];
4347  $ilDB = $DIC['ilDB'];
4348 
4349  $query = "SELECT usr_data.*, usr_pref.value AS language
4350  FROM usr_data
4351  LEFT JOIN usr_pref ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
4352  WHERE " . $ilDB->in("usr_data.usr_id", $a_mem_ids, false, "integer") . "
4353  AND usr_data.usr_id != %s";
4354  $values[] = "language";
4355  $types[] = "text";
4356  $values[] = ANONYMOUS_USER_ID;
4357  $types[] = "integer";
4358 
4359  if (is_numeric($active) && $active > -1) {
4360  $query .= " AND active = %s";
4361  $values[] = $active;
4362  $types[] = "integer";
4363  }
4364 
4365  if ($timelimitowner != USER_FOLDER_ID && $timelimitowner != -1) {
4366  $query .= " AND usr_data.time_limit_owner = %s";
4367  $values[] = $timelimitowner;
4368  $types[] = "integer";
4369  }
4370 
4371  $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4372 
4373  $result = $ilDB->queryF($query, $types, $values);
4374  while ($row = $ilDB->fetchAssoc($result)) {
4375  $mem_arr[] = $row;
4376  }
4377 
4378  return $mem_arr ? $mem_arr : array();
4379  }
const ANONYMOUS_USER_ID
Definition: constants.php:25
const USER_FOLDER_ID
Definition: constants.php:31
$result
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the caller graph for this function:

◆ _getUsersForRole()

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

return array of complete users which belong to a specific role

Parameters
introle id
int$activeif -1, all users will be delivered, 0 only non active, 1 only active users

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

References $active, $data, $DIC, $ilDB, $query, and ilObject\$rbacreview.

Referenced by ilSoapUserAdministration\getUserForRole().

4244  {
4245  global $DIC;
4246 
4247  $ilDB = $DIC['ilDB'];
4248  $rbacreview = $DIC['rbacreview'];
4249  $data = array();
4250 
4251  $ids = $rbacreview->assignedUsers($role_id);
4252 
4253  if (count($ids) == 0) {
4254  $ids = array(-1);
4255  }
4256 
4257  $query = "SELECT usr_data.*, usr_pref.value AS language
4258  FROM usr_data
4259  LEFT JOIN usr_pref ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
4260  WHERE " . $ilDB->in("usr_data.usr_id", $ids, false, "integer");
4261  $values[] = "language";
4262  $types[] = "text";
4263 
4264 
4265  if (is_numeric($active) && $active > -1) {
4266  $query .= " AND usr_data.active = %s";
4267  $values[] = $active;
4268  $types[] = "integer";
4269  }
4270 
4271  $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4272 
4273  $r = $ilDB->queryF($query, $types, $values);
4274  $data = array();
4275  while ($row = $ilDB->fetchAssoc($r)) {
4276  $data[] = $row;
4277  }
4278  return $data;
4279  }
$data
Definition: storeScorm.php:23
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the caller graph for this function:

◆ _incrementLoginAttempts()

static ilObjUser::_incrementLoginAttempts (   $a_usr_id)
static

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

References $DIC, $ilDB, and $query.

Referenced by ilAuthFrontend\handleAuthenticationFail(), and ilObjUserTest\testAuthAndEmailMethods().

4516  {
4517  global $DIC;
4518 
4519  $ilDB = $DIC['ilDB'];
4520 
4521  $query = "UPDATE usr_data SET login_attempts = (login_attempts + 1) WHERE usr_id = %s";
4522  $affected = $ilDB->manipulateF($query, array('integer'), array($a_usr_id));
4523 
4524  if ($affected) {
4525  return true;
4526  } else {
4527  return false;
4528  }
4529  }
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the caller graph for this function:

◆ _isAnonymous()

static ilObjUser::_isAnonymous (   $usr_id)
static

◆ _loginExists()

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

check if a login name already exists You may exclude a user from the check by giving his user id as 2nd paramter public static

Parameters
stringlogin name
integeruser id of user to exclude (optional)
Returns
boolean

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

References $DIC, and $ilDB.

Referenced by ilUserLoginInputGUI\checkInput(), ilAuthProviderSaml\handleSamlAuth(), ilCalendarAppointmentGUI\loadNotificationRecipients(), ilLuceneQueryParser\replaceOwnerCallback(), ilAccountRegistrationGUI\saveForm(), ilPDOAuthentication\setAuth(), ilConsultationHourAppointments\setManager(), ilObjUserTest\testCreateSetLookupDelete(), and ilPersonalProfileGUI\updateLoginOrSetErrorMessages().

4187  {
4188  global $DIC;
4189 
4190  $ilDB = $DIC['ilDB'];
4191 
4192  $q = "SELECT DISTINCT login, usr_id FROM usr_data " .
4193  "WHERE login = %s";
4194  $types[] = "text";
4195  $values[] = $a_login;
4196 
4197  if ($a_user_id != 0) {
4198  $q .= " AND usr_id != %s ";
4199  $types[] = "integer";
4200  $values[] = $a_user_id;
4201  }
4202 
4203  $r = $ilDB->queryF($q, $types, $values);
4204 
4205  if ($row = $ilDB->fetchAssoc($r)) {
4206  return $row['usr_id'];
4207  }
4208  return false;
4209  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _lookup()

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

Private function for lookup methods.

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

References $DIC, $ilDB, and $res.

Referenced by _lookupAuthMode(), _lookupClientIP(), _lookupEmail(), _lookupExternalAccount(), _lookupFirstLogin(), _lookupGender(), _lookupLastLogin(), _lookupLogin(), _lookupSecondEmail(), and getStoredActive().

687  {
688  global $DIC;
689 
690  $ilDB = $DIC['ilDB'];
691 
692  $res = $ilDB->queryF(
693  "SELECT " . $a_field . " FROM usr_data WHERE usr_id = %s",
694  array("integer"),
695  array($a_user_id)
696  );
697 
698  while ($set = $ilDB->fetchAssoc($res)) {
699  return $set[$a_field];
700  }
701  return false;
702  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupActive()

static ilObjUser::_lookupActive (   $a_usr_id)
static

Check user account active.

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

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

Referenced by ilMailSearchGroupsGUI\cancel(), ilMailSearchCoursesGUI\cancel(), ilLearningSequenceParticipantsTableGUI\fillRow(), ILIAS\Contact\Provider\ContactNotificationProvider\getNotifications(), and ilBuddySystemRelationsTableGUI\populate().

2267  {
2268  global $DIC;
2269 
2270  $ilDB = $DIC['ilDB'];
2271 
2272  $query = 'SELECT usr_id FROM usr_data ' .
2273  'WHERE active = ' . $ilDB->quote(1, 'integer') . ' ' .
2274  'AND usr_id = ' . $ilDB->quote($a_usr_id, 'integer');
2275  $res = $ilDB->query($query);
2276  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
2277  return true;
2278  }
2279  return false;
2280  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupAuthMode()

static ilObjUser::_lookupAuthMode (   $a_usr_id)
static

lookup auth mode

public

Parameters
intusr_id

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

References _lookup().

Referenced by ilECSAppEventListener\handleEvent(), ilLTIAppEventListener\handleOutcomeWithoutLP(), ilLTIAppEventListener\handleUpdateStatus(), and ilObjUserTest\testAuthAndEmailMethods().

3558  {
3559  return (string) ilObjUser::_lookup($a_usr_id, "auth_mode");
3560  }
static _lookup($a_user_id, $a_field)
Private function for lookup methods.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _lookupClientIP()

static ilObjUser::_lookupClientIP (   $a_user_id)
static

Lookup client ip.

Parameters
intuser id
Returns
string client ip

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

References _lookup().

Referenced by ilObjTest\inviteGroup(), ilObjTest\inviteRole(), and ilObjUserTest\testCreateSetLookupDelete().

766  {
767  return ilObjUser::_lookup($a_user_id, "client_ip");
768  }
static _lookup($a_user_id, $a_field)
Private function for lookup methods.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _lookupEmail()

static ilObjUser::_lookupEmail (   $a_user_id)
static

Lookup email.

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

References _lookup().

Referenced by ilObjSurvey\getAppraiseesData(), ilAccessibilitySupportContacts\getMailsToAddress(), ilSystemSupportContacts\getMailsToAddress(), ilObjSurvey\getRatersData(), ilBadgeHandler\sendNotification(), ilMailSearchGUI\showResults(), and ilObjUserTest\testCreateSetLookupDelete().

737  {
738  return ilObjUser::_lookup($a_user_id, "email");
739  }
static _lookup($a_user_id, $a_field)
Private function for lookup methods.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _lookupExternalAccount()

static ilObjUser::_lookupExternalAccount (   $a_user_id)
static

lookup external account for login and authmethod

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

References _lookup().

Referenced by ilLTIAppEventListener\handleOutcomeWithoutLP(), ilLTIAppEventListener\handleUpdateStatus(), ilUserImportParser\importEndTag(), ilObjUserTest\testCreateSetLookupDelete(), and ilUserImportParser\verifyEndTag().

825  {
826  return ilObjUser::_lookup($a_user_id, "ext_account");
827  }
static _lookup($a_user_id, $a_field)
Private function for lookup methods.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _lookupFeedHash()

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

Lookup news feed hash for user.

If hash does not exist, create one.

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

References $DIC, and $ilDB.

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

4112  {
4113  global $DIC;
4114 
4115  $ilDB = $DIC['ilDB'];
4116 
4117  if ($a_user_id > 0) {
4118  $set = $ilDB->queryF(
4119  "SELECT feed_hash from usr_data WHERE usr_id = %s",
4120  array("integer"),
4121  array($a_user_id)
4122  );
4123  if ($rec = $ilDB->fetchAssoc($set)) {
4124  if (strlen($rec["feed_hash"]) == 32) {
4125  return $rec["feed_hash"];
4126  } elseif ($a_create) {
4127  $hash = md5(rand(1, 9999999) + str_replace(" ", "", (string) microtime()));
4128  $ilDB->manipulateF(
4129  "UPDATE usr_data SET feed_hash = %s" .
4130  " WHERE usr_id = %s",
4131  array("text", "integer"),
4132  array($hash, $a_user_id)
4133  );
4134  return $hash;
4135  }
4136  }
4137  }
4138 
4139  return false;
4140  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupFields()

static ilObjUser::_lookupFields (   $a_user_id)
static

lookup fields (deprecated; use more specific methods instead)

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

References $DIC, $ilDB, and $res.

Referenced by ilTestExport\exportToCSV(), ilTestExport\exportToExcel(), ilSpecialUsersTableGUI\fillRow(), ilCertificateUserObjectHelper\lookupFields(), ilTestEvaluationGUI\outEvaluation(), and ilObjUserTest\testCreateSetLookupDelete().

799  {
800  global $DIC;
801 
802  $ilDB = $DIC['ilDB'];
803 
804  $res = $ilDB->queryF(
805  "SELECT * FROM usr_data WHERE usr_id = %s",
806  array("integer"),
807  array($a_user_id)
808  );
809  $user_rec = $ilDB->fetchAssoc($res);
810  return $user_rec;
811  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupFirstLogin()

static ilObjUser::_lookupFirstLogin (   $a_user_id)
static

lookup first login

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

References _lookup().

Referenced by ilFirstLoginLearningHistoryProvider\getEntries().

871  {
872  return ilObjUser::_lookup($a_user_id, "first_login");
873  }
static _lookup($a_user_id, $a_field)
Private function for lookup methods.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _lookupFullname()

static ilObjUser::_lookupFullname (   $a_user_id)
static

Lookup Full Name.

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

References $DIC, $fullname, and $ilDB.

Referenced by ilExAssignmentTeam\addTeamMember(), ilCalendarAppointmentGUI\book(), ilBookingProcessGUI\bookMultipleParticipants(), ilObjStudyProgrammeIndividualPlanGUI\buildFrame(), ilCalendarAppointmentGUI\cancelBooking(), ilObjSurvey\checkReminder(), ilExAssignmentReminder\checkReminders(), ilAppointmentPresentationConsultationHoursGUI\collectPropertiesAndActions(), ilObjStudyProgrammeMembersGUI\confirmRemoveUsers(), ilExAssignmentTeam\createTeam(), ilObjDataCollection\doUpdate(), ilRbacLogTableGUI\fillRow(), ilTestManScoringParticipantsBySelectedQuestionAndPassTableGUI\fillRow(), ilConsultationHourUtils\getConsultationHourLinksForRepositoryObject(), ilLPTableBaseGUI\getExportMeta(), ilCalendarAppointmentPanelGUI\getHTML(), ilCalendarBlockGUI\getHTML(), ilExAssignmentTeamLogTableGUI\getItems(), ilLearningModuleNotification\getMailBody(), ilConsultationHourAppointments\getManager(), ilObjStudyProgramme\getProgressIdString(), ilObjSurvey\getSurveyParticipants(), ilExAssignmentTeam\getTeamId(), ilExParticipantTableGUI\initMode(), ilSCORMTrackingItemsPerUserTableGUI\initTable(), ilSCORMTrackingItemPerUserTableGUI\initTable(), ilBookingEntry\lookupManagedBookingsForObject(), ilSCORMTrackingItemsScoTableGUI\parse(), ilConsultationHoursTableGUI\parse(), ilCalendarPresentationGUI\prepareOutput(), ilCalendarCategories\readConsultationHoursCalendar(), ilExAssignmentTeam\removeTeamMember(), ilIndividualAssessmentMembersGUI\removeUserConfirmation(), ilTestScoringByQuestionsGUI\saveManScoringByQuestion(), ilCalendarMailNotification\send(), ilConsultationHoursGUI\sendInfoAboutUnassignedUsers(), ilObjStudyProgramme\sendInformToReAssignMail(), ilObjStudyProgramme\sendInvalidateMail(), ilWikiUtil\sendNotification(), ilNote\sendNotifications(), ilObjStudyProgramme\sendReAssignedMail(), ilObjStudyProgramme\sendRiskyToFailMail(), ilObjSurvey\sendTutorNotification(), and ilObjSurvey\sendTutorResults().

708  {
709  global $DIC;
710 
711  $ilDB = $DIC['ilDB'];
712 
713  $set = $ilDB->queryF(
714  "SELECT title, firstname, lastname FROM usr_data WHERE usr_id = %s",
715  array("integer"),
716  array($a_user_id)
717  );
718 
719  if ($rec = $ilDB->fetchAssoc($set)) {
720  if ($rec["title"]) {
721  $fullname = $rec["title"] . " ";
722  }
723  if ($rec["firstname"]) {
724  $fullname .= $rec["firstname"] . " ";
725  }
726  if ($rec["lastname"]) {
727  $fullname .= $rec["lastname"];
728  }
729  }
730  return $fullname;
731  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupGender()

static ilObjUser::_lookupGender (   $a_user_id)
static

Lookup gender.

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

References _lookup().

Referenced by ilMail\getSalutation(), ilObjStudyProgramme\sendInformToReAssignMail(), ilObjStudyProgramme\sendInvalidateMail(), ilObjStudyProgramme\sendReAssignedMail(), ilObjStudyProgramme\sendRiskyToFailMail(), and ilObjUserTest\testCreateSetLookupDelete().

755  {
756  return ilObjUser::_lookup($a_user_id, "gender");
757  }
static _lookup($a_user_id, $a_field)
Private function for lookup methods.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _lookupId()

static ilObjUser::_lookupId (   $a_user_str)
static

Lookup id by login.

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

References $DIC, $ilDB, and $res.

Referenced by ilMail\__construct(), ilSurveyEvaluationGUI\addApprSelectionToToolbar(), ilOrgUnitStaffGUI\addOtherRoles(), ilOrgUnitUserAssignmentGUI\addStaff(), ilOrgUnitStaffGUI\addStaff(), ilRepositorySearchGUI\addUserFromAutoComplete(), ilObjBlogGUI\addUserFromAutoComplete(), ilBookingParticipantGUI\addUserFromAutoCompleteObject(), ilExSubmissionTeamGUI\addUserFromAutoCompleteObject(), ilExerciseManagementGUI\addUserFromAutoCompleteObject(), ilTreeTrashQueries\appendTrashNodeForContainerQueryFilter(), ilSkillProfileGUI\assignUser(), ilOrgUnitSimpleUserImport\buildUserId(), ilChatroomInviteUsersToPrivateRoomGUI\byLogin(), ilPermission2GUI\changeOwner(), checkUserId(), ilAuthProviderShibboleth\doAuthentication(), ilAuthProviderApache\doAuthentication(), ilAuthProviderCAS\doAuthentication(), ilAuthProviderRadius\doAuthentication(), ilLTIAppEventListener\doCronUpdate(), ilAuthProviderLTI\findUserId(), ilMail\formatNamesForOutput(), ilObjectPermissionStatusGUI\getUser(), getUserIdByLogin(), ilAccessibilitySupportContacts\getValidSupportContactIds(), ilSystemSupportContacts\getValidSupportContactIds(), ilDclStandardField\getValueFromExcel(), ilSoapObjectAdministration\getXMLTree(), ilAuthFrontend\handleAuthenticationFail(), ilAuthProviderCAS\handleLDAPDataSource(), ilAuthProviderApache\handleLDAPDataSource(), ilAuthProviderECS\handleLogin(), ilSessionControl\handleLoginEvent(), ilAuthProviderSaml\handleSamlAuth(), ilAuthProviderSoap\handleSoapAuth(), ilAuthProviderSaml\importUser(), ilPCParagraph\intLinks2xml(), ilChatroom\inviteUserToPrivateRoomByLogin(), ilSoapRBACAdministration\parseUserID(), ilStartUpGUI\processCode(), ilECSCmsCourseMemberCommandQueueHandler\refreshAssignmentStatus(), ilDclRecordEditGUI\save(), ilObjSurveyGUI\savePropertiesObject(), ilSingleUserShareGUI\saveShare(), ilNote\sendNotifications(), ilRegistrationSettings\setApproveRecipientLogins(), ilOpenIdConnectUserSync\setInternalAccount(), ilAccessibilitySupportContacts\setList(), ilSystemSupportContacts\setList(), ilObjUserGUI\showUpperIcon(), ilObjUserTest\testCreateSetLookupDelete(), ilAuthProviderLDAP\updateAccount(), ilLDAPAttributeToUser\usersToXML(), ilRegistrationSettings\validate(), and ilUserImportParser\verifyEndTag().

833  {
834  global $DIC;
835 
836  $ilDB = $DIC['ilDB'];
837 
838  if (!is_array($a_user_str)) {
839  $res = $ilDB->queryF(
840  "SELECT usr_id FROM usr_data WHERE login = %s",
841  array("text"),
842  array($a_user_str)
843  );
844  $user_rec = $ilDB->fetchAssoc($res);
845  return $user_rec["usr_id"];
846  } else {
847  $set = $ilDB->query(
848  "SELECT usr_id FROM usr_data " .
849  " WHERE " . $ilDB->in("login", $a_user_str, false, "text")
850  );
851  $ids = array();
852  while ($rec = $ilDB->fetchAssoc($set)) {
853  $ids[] = $rec["usr_id"];
854  }
855  return $ids;
856  }
857  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupLanguage()

static ilObjUser::_lookupLanguage (   $a_usr_id)
static

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

References $DIC, $ilDB, and ilObject\$lng.

Referenced by ilForum\_getLanguageInstanceByUsrId(), ilLanguageFactory\_getLanguageOfUser(), and ilObjUserTest\testCreateSetLookupDelete().

2037  {
2038  global $DIC;
2039 
2040  $ilDB = $DIC->database();
2041  $lng = $DIC->language();
2042 
2043  $q = "SELECT value FROM usr_pref WHERE usr_id= " .
2044  $ilDB->quote($a_usr_id, "integer") . " AND keyword = " .
2045  $ilDB->quote('language', "text");
2046  $r = $ilDB->query($q);
2047 
2048  while ($row = $ilDB->fetchAssoc($r)) {
2049  return $row['value'];
2050  }
2051  if (is_object($lng)) {
2052  return $lng->getDefaultLanguage();
2053  }
2054  return 'en';
2055  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupLastLogin()

static ilObjUser::_lookupLastLogin (   $a_user_id)
static

lookup last login

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

References _lookup().

Referenced by ilCronDeleteInactiveUserReminderMail\removeEntriesFromTableIfLastLoginIsNewer(), and ilObjUserTest\testCreateSetLookupDelete().

863  {
864  return ilObjUser::_lookup($a_user_id, "last_login");
865  }
static _lookup($a_user_id, $a_field)
Private function for lookup methods.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _lookupLogin()

static ilObjUser::_lookupLogin (   $a_user_id)
static

lookup login

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

References _lookup().

Referenced by ilMailSummaryNotification\__construct(), ilCourseXMLParser\__parseId(), ilRegistrationSettings\__read(), ilOrgUnitUserAssignmentGUI\assignmentsRecursive(), ilObjSurvey\checkReminder(), ilExAssignmentReminder\checkReminders(), ilWorkspaceUserActionProvider\collectActionsForTargetUser(), ilChatUserActionProvider\collectActionsForTargetUser(), ilForumMailEventNotificationSender\createMailValueObjectsWithAttachments(), ilForumMailEventNotificationSender\createMailValueObjectWithoutAttachments(), ilObjRole\delete(), ilStartUpGUI\doStandardAuthentication(), ilObjDataCollection\doUpdate(), ilObjSessionGUI\eventsListObject(), ilSessionOverviewGUI\exportCSV(), ilStudyProgrammeIndividualPlanTableGUI\fetchData(), ilDclBaseRecordModel\fillRecordFieldExcelExport(), ilPageHistoryTableGUI\fillRow(), ilMilestoneResponsiblesTableGUI\fillRow(), ilPDNewsTableGUI\fillRow(), ilTestServiceGUI\getAdditionalUsrDataHtmlAndPopulateWindowTitle(), ilUserAvatarResolver\getAvatar(), ilAccessibilitySupportContactsGUI\getContactLogins(), ilAttendanceList\getHTML(), getLoginByUserId(), getLoginFromAuth(), ilConsultationHourAppointments\getManagedUsers(), ilConsultationHourAppointments\getManager(), ilNoteGUI\getNoteListHTML(), ilStudyProgrammeMailMemberSearchGUI\getProcessData(), ilTestServiceGUI\getResultsHeadUserAndPass(), ilStudyProgrammeMailTemplateContext\getSpecificPlaceholders(), ilObjSurvey\getUserDataFromActiveId(), ilForumSettingsGUI\getUserNotificationTableData(), ilInternalLinkGUI\getUserSearchResult(), ilUserClipboard\getValidatedContent(), ilObjUserGUI\getValues(), ilAuthFrontend\handleAuthenticationSuccess(), ilCalendarAppointmentGUI\initForm(), ilMailSearchGroupsGUI\mailMembers(), ilMailSearchCoursesGUI\mailMembers(), ilContactGUI\mailToUsers(), ilPermission2GUI\owner(), ilUserClipboardTableGUI\parse(), ilCalendarSharedUserListTableGUI\parse(), ilTrashTableGUI\parse(), ilLearningSequenceRoles\readMemberData(), ilCalendarEntry\readResponsibleUsers(), ilExerciseManagementGUI\redirectFeedbackMailObject(), ilBuddyList\request(), ilLearningModuleNotification\send(), ilObjSurvey\send360ReminderToUser(), ilObjSurvey\sendAppraiseeCloseNotification(), ilObjSurvey\sendAppraiseeNotification(), ilTimingsCronReminder\sendExceededMail(), ilTimingsCronReminder\sendFreshlyStartedMail(), ilObjStudyProgramme\sendInformToReAssignMail(), ilObjStudyProgramme\sendInvalidateMail(), ilLPTableBaseGUI\sendMail(), ilSkillNotifications\sendMail(), ilMailNotification\sendMail(), ilMembershipCronNotifications\sendMail(), ilObjContentObjectGUI\sendMailToBlockedUsers(), ilMembershipMailGUI\sendMailToSelectedUsers(), ilStudyProgrammeMailMemberSearchGUI\sendMailToSelectedUsers(), ilMailMemberSearchGUI\sendMailToSelectedUsers(), ilMembershipGUI\sendMailToSelectedUsers(), ilMembershipCronMinMembers\sendMessage(), ilWikiUtil\sendNotification(), ilNote\sendNotifications(), ilObjSurvey\sendRaterNotification(), ilObjStudyProgramme\sendReAssignedMail(), ilObjStudyProgramme\sendRiskyToFailMail(), ilObjSurvey\sendTutorNotification(), ilObjSurvey\sendTutorResults(), ilMailSearchCoursesGUI\showMembers(), ilMailSearchGUI\showResults(), ilMailFolderGUI\showUser(), ilContactGUI\submitInvitation(), ilObjUserTest\testCreateSetLookupDelete(), ilBuddySystemGUI\transitionAsyncCommand(), ilBuddySystemGUI\transitionCommand(), ilUserImportParser\verifyEndTag(), and ilPCParagraph\xml2output().

817  {
818  return ilObjUser::_lookup($a_user_id, "login");
819  }
static _lookup($a_user_id, $a_field)
Private function for lookup methods.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _lookupName()

static ilObjUser::_lookupName (   $a_user_id)
static

lookup user name

Returns
array array('user_id' => ...,'firstname' => ...,'lastname' => ...,'login' => ...,'title' => ...)

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

References $DIC, $ilDB, and $res.

Referenced by ilExGradesTableGUI\__construct(), ilBookingAssignObjectsTableGUI\__construct(), ilGroupXMLParser\__parseId(), ilObjTestAccess\_getParticipantData(), ilSoapLearningProgressAdministration\addUserProgress(), ilTimingsCronReminder\buildMailSalutation(), ilMailUserActionProvider\collectActionsForTargetUser(), ilExerciseManagementCollectFilesJob\collectAssignmentData(), ilMembershipGUI\confirmAssignFromWaitingList(), ilMembershipGUI\confirmAssignSubscribers(), ilSessionMembershipGUI\confirmDeleteParticipants(), ilMembershipGUI\confirmDeleteParticipants(), ilMembershipGUI\confirmRefuseFromList(), ilMembershipGUI\confirmRefuseSubscribers(), ilOrgUnitStaffGUI\confirmRemoveUser(), ilLocalUserGUI\deleteUsers(), ilObjCategoryGUI\deleteUsersObject(), ilBlogExerciseGUI\downloadExcSubFile(), ilPortfolioExerciseGUI\downloadExcSubFile(), ilWikiPageGUI\downloadExcSubFile(), ilExSubmission\downloadFiles(), ilExSubmission\downloadMultipleFiles(), ilObjSessionGUI\eventsListObject(), ilSessionOverviewGUI\exportCSV(), ilObjExercise\exportGradesExcel(), ilObjAssessmentFolderGUI\exportLogObject(), ilDclBaseRecordModel\fillRecordFieldExcelExport(), ilStudyProgrammeAutoCategoriesTableGUI\fillRow(), ilStudyProgrammeAutoMembershipsTableGUI\fillRow(), ilAssessmentFolderLogTableGUI\fillRow(), ilPageHistoryTableGUI\fillRow(), ilCalendarInboxSharedTableGUI\fillRow(), ilFileVersionsTableGUI\fillRow(), ilRbacLogTableGUI\fillRow(), ilObjSurvey\getAppraiseesData(), ilBookingParticipant\getAssignableParticipants(), ilLMTracker\getBlockedUsersInformation(), ilExSubmission\getDirectoryNameFromUserData(), ilIndividualAssessmentMembersTableGUI\getFullNameFor(), ilAttendanceList\getHTML(), ilSurveyParticipantsTableGUI\getItems(), ilSessionOverviewTableGUI\getItems(), ilCourseParticipantsGroupsTableGUI\getItems(), ilBookingParticipant\getList(), ilBookingReservationDBRepository\getListByDate(), ilExAssignment\getMemberListData(), ilContSkillMemberTableGUI\getMembers(), ilExAssignment\getMultiFeedbackFiles(), ilPageObject\getPageContributors(), ilPageObject\getParentObjectContributors(), ilDownloadSubmissionsBackgroundTask\getParticipantBucketTitle(), ilMilestoneResponsiblesTableGUI\getParticipantsAndResponsibles(), ilStudyProgrammeMailMemberSearchGUI\getProcessData(), ilObjWikiListGUI\getProperties(), ilObjSurvey\getRatersData(), ilMail\getSalutation(), ilDclBaseRecordModel\getStandardField(), ilObjSurvey\getSurveyParticipants(), ilForumSettingsGUI\getUserNotificationTableData(), ilObjStudyProgrammeAutoCategoriesGUI\getUserRepresentation(), ilObjStudyProgrammeAutoMembershipsGUI\getUserRepresentation(), ilExerciseXMLWriter\handleAssignmentMembers(), ilWorkspaceShareTableGUI\importData(), ilLOMemberTestResultTableGUI\init(), ilContSkillAdminGUI\initCompetenceAssignmentForm(), ilWorkspaceShareTableGUI\initFilter(), ilExerciseManagementGUI\initIndividualDeadlineForm(), ilObjectCustomUserFieldsGUI\initMemberForm(), ilExParticipantTableGUI\initMode(), ilObjSurveyGUI\initPropertiesForm(), ilGroupParticipantsTableGUI\lookupUserName(), ilCourseParticipantsTableGUI\lookupUserName(), ilTestEvaluationGUI\outParticipantsResultsOverview(), ilCourseReferenceDeleteConfirmationTableGUI\parse(), ilUserClipboardTableGUI\parse(), ilCalendarSharedUserListTableGUI\parse(), ilCalendarSharedListTableGUI\parse(), ilConsultationHoursTableGUI\parse(), ilObjPortfolioGUI\printView(), ilLearningSequenceRoles\readMemberData(), ilObjCourseGUI\readMemberData(), ilCalendarEntry\readResponsibleUsers(), ilSubscriberTableGUI\readSubscriberData(), ilWaitingListTableGUI\readUserData(), ilObjPortfolioBaseGUI\renderFullscreenHeader(), ilObjBlogGUI\renderFullscreenHeader(), ilTestScoringGUI\saveManScoringParticipantScreen(), ilExerciseManagementGUI\saveStatus(), ilExAssignment\sendMultiFeedbackStructureFile(), ilMailSearchCoursesGUI\showMembers(), ilExerciseManagementGUI\showParticipantObject(), ilMailSearchGUI\showResults(), ilCourseContentGUI\showUserTimings(), ilObjUserTest\testCreateSetLookupDelete(), ilObjTest\userLookupFullName(), ilMailNotification\userToString(), and ilObjStudyProgrammeMembersGUI\viewCompletedCourses().

777  {
778  global $DIC;
779 
780  $ilDB = $DIC['ilDB'];
781 
782  $res = $ilDB->queryF(
783  "SELECT firstname, lastname, title, login FROM usr_data WHERE usr_id = %s",
784  array("integer"),
785  array($a_user_id)
786  );
787  $user_rec = $ilDB->fetchAssoc($res);
788  return array("user_id" => $a_user_id,
789  "firstname" => $user_rec["firstname"],
790  "lastname" => $user_rec["lastname"],
791  "title" => $user_rec["title"],
792  "login" => $user_rec["login"]);
793  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupPref()

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

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

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

Referenced by _getFeedPass(), ilNewsItem\_getNewsItemsOfUser(), ilChatUserActionProvider\acceptsMessages(), ilObjUserAccess\canBeDelivered(), ilUserUserActionProvider\collectActionsForTargetUser(), ilMailFolderGUI\confirmDeleteMails(), ilMailSearchCoursesMembersTableGUI\fillRow(), ilBuddySystemRelationsTableGUI\fillRow(), ilMail\formatNamesForOutput(), ilBuddySystemLinkButton\getHtml(), ilStudyProgrammeMailMemberSearchGUI\getProcessData(), ilUserUtil\getProfileLink(), ilBuddySystemGUI\requestCommand(), ilMailSearchGroupsGUI\showMembers(), ilMailSearchCoursesGUI\showMembers(), ilMailSearchGUI\showResults(), ilObjUserTest\testCreateSetLookupDelete(), and ilBuddySystemGUI\transitionAsyncCommand().

1282  {
1283  global $DIC;
1284 
1285  $ilDB = $DIC['ilDB'];
1286 
1287  $query = "SELECT * FROM usr_pref WHERE usr_id = " . $ilDB->quote($a_usr_id, "integer") . " " .
1288  "AND keyword = " . $ilDB->quote($a_keyword, "text");
1289  $res = $ilDB->query($query);
1290 
1291  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1292  return $row->value;
1293  }
1294  return false;
1295  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupSecondEmail()

static ilObjUser::_lookupSecondEmail (   $a_user_id)
static

Lookup second e-mail.

Parameters
$a_user_id
Returns
null|string

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

References _lookup().

747  {
748  return ilObjUser::_lookup($a_user_id, "second_email");
749  }
static _lookup($a_user_id, $a_field)
Private function for lookup methods.
+ Here is the call graph for this function:

◆ _moveUsersToStyle()

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

skins and styles

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

References $DIC, and $ilDB.

Referenced by ilSystemStyleOverviewGUI\moveUserStyles(), and ilObjUserTest\testMiscellaneous().

3087  {
3088  global $DIC;
3089 
3090  $ilDB = $DIC['ilDB'];
3091 
3092  $q = "SELECT up1.usr_id usr_id FROM usr_pref up1, usr_pref up2 " .
3093  " WHERE up1.keyword= " . $ilDB->quote("style", "text") .
3094  " AND up1.value= " . $ilDB->quote($a_from_style, "text") .
3095  " AND up2.keyword= " . $ilDB->quote("skin", "text") .
3096  " AND up2.value= " . $ilDB->quote($a_from_skin, "text") .
3097  " AND up1.usr_id = up2.usr_id ";
3098 
3099  $usr_set = $ilDB->query($q);
3100 
3101  while ($usr_rec = $ilDB->fetchAssoc($usr_set)) {
3102  self::_writePref($usr_rec["usr_id"], "skin", $a_to_skin);
3103  self::_writePref($usr_rec["usr_id"], "style", $a_to_style);
3104  }
3105  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _readUsersProfileData()

static ilObjUser::_readUsersProfileData (   $a_user_ids)
static

STATIC METHOD get user data of selected users.

Parameters
arraydesired user ids
Returns
array of user data public

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

References $DIC, $ilDB, and $res.

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

2918  {
2919  global $DIC;
2920 
2921  $ilDB = $DIC['ilDB'];
2922  $res = $ilDB->query("SELECT * FROM usr_data WHERE " .
2923  $ilDB->in("usr_id", $a_user_ids, false, "integer"));
2924  while ($row = $ilDB->fetchAssoc($res)) {
2925  $user_data["$row[usr_id]"] = $row;
2926  }
2927  return $user_data ? $user_data : array();
2928  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _resetLoginAttempts()

static ilObjUser::_resetLoginAttempts (   $a_usr_id)
static

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

References $DIC, $ilDB, and $query.

Referenced by ilAuthFrontend\handleAuthenticationSuccess(), ilObjUserTest\testAuthAndEmailMethods(), and ilObjUserGUI\updateObject().

4486  {
4487  global $DIC;
4488 
4489  $ilDB = $DIC['ilDB'];
4490 
4491  $query = "UPDATE usr_data SET login_attempts = 0 WHERE usr_id = %s";
4492  $affected = $ilDB->manipulateF($query, array('integer'), array($a_usr_id));
4493 
4494  if ($affected) {
4495  return true;
4496  } else {
4497  return false;
4498  }
4499  }
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the caller graph for this function:

◆ _setFeedPass()

static ilObjUser::_setFeedPass (   $a_user_id,
  $a_password 
)
static

Set news feed password for user.

Parameters
integeruser_id
stringnew password

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

References $DIC, and $ilDB.

4165  {
4166  global $DIC;
4167 
4168  $ilDB = $DIC['ilDB'];
4169 
4170  self::_writePref(
4171  $a_user_id,
4172  "priv_feed_pass",
4173  ($a_password == "") ? "" : md5($a_password)
4174  );
4175  }
global $DIC
Definition: goto.php:24
global $ilDB

◆ _setUserInactive()

static ilObjUser::_setUserInactive (   $a_usr_id)
static

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

References $DIC, $ilDB, $query, and ilUtil\now().

Referenced by ilAuthFrontend\handleAuthenticationFail(), and ilObjUserTest\testAuthAndEmailMethods().

4532  {
4533  global $DIC;
4534 
4535  $ilDB = $DIC['ilDB'];
4536 
4537  $query = "UPDATE usr_data SET active = 0, inactivation_date = %s WHERE usr_id = %s";
4538  $affected = $ilDB->manipulateF($query, array('timestamp', 'integer'), array(ilUtil::now(), $a_usr_id));
4539 
4540  if ($affected) {
4541  return true;
4542  } else {
4543  return false;
4544  }
4545  }
static now()
Return current timestamp in Y-m-d H:i:s format.
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _toggleActiveStatusOfUsers()

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

Toggle active status of users.

public

Parameters

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

References $DIC, $ilDB, and ilUtil\now().

Referenced by ilLDAPCronSynchronization\deactivateUsers(), and ilObjUserTest\testCreateSetLookupDelete().

3516  {
3517  global $DIC;
3518 
3519  $ilDB = $DIC['ilDB'];
3520 
3521  if (!is_array($a_usr_ids)) {
3522  return false;
3523  }
3524 
3525 
3526  if ($a_status) {
3527  $q = "UPDATE usr_data SET active = 1, inactivation_date = NULL WHERE " .
3528  $ilDB->in("usr_id", $a_usr_ids, false, "integer");
3529  $ilDB->manipulate($q);
3530  } else {
3531  $usrId_IN_usrIds = $ilDB->in("usr_id", $a_usr_ids, false, "integer");
3532 
3533  $q = "UPDATE usr_data SET active = 0 WHERE $usrId_IN_usrIds";
3534  $ilDB->manipulate($q);
3535 
3536  $queryString = "
3537  UPDATE usr_data
3538  SET inactivation_date = %s
3539  WHERE inactivation_date IS NULL
3540  AND $usrId_IN_usrIds
3541  ";
3542  $ilDB->manipulateF($queryString, array('timestamp'), array(ilUtil::now()));
3543  }
3544 
3545  return true;
3546  }
static now()
Return current timestamp in Y-m-d H:i:s format.
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _updateLastLogin()

static ilObjUser::_updateLastLogin (   $a_usr_id,
  $a_last_login = null 
)
static

STATIC METHOD updates the last_login field of user with given id to given or current date.

Parameters
integer$a_usr_id
string$last_login(optional)
Returns
$last_login or false public

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

References $DIC, $ilDB, and $query.

4906  {
4907  if ($a_last_login !== null) {
4908  $last_login = $a_last_login;
4909  } else {
4910  $last_login = date('Y-m-d H:i:s');
4911  }
4912 
4913  global $DIC;
4914 
4915  $ilDB = $DIC['ilDB'];
4916 
4917  $query = "UPDATE usr_data SET last_login = %s WHERE usr_id = %s";
4918  $affected = $ilDB->manipulateF($query, array('timestamp', 'integer'), array($last_login, $a_usr_id));
4919 
4920  $query = "UPDATE usr_data SET first_login = %s WHERE usr_id = %s AND first_login IS NULL";
4921  $ilDB->manipulateF($query, array('timestamp', 'integer'), array($last_login, $a_usr_id));
4922 
4923 
4924  if ($affected) {
4925  return $last_login;
4926  } else {
4927  return false;
4928  }
4929  }
global $DIC
Definition: goto.php:24
$query
global $ilDB

◆ _uploadPersonalPicture()

static ilObjUser::_uploadPersonalPicture (   $tmp_file,
  $obj_id 
)
static

Create a personal picture image file from a temporary image file.

Parameters
string$tmp_fileComplete path to the temporary image file
int$obj_idThe object id of the related user account
Returns
returns TRUE on success, otherwise FALSE

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

References ilUtil\execConvert(), ilUtil\getWebspaceDir(), and ilUtil\isConvertVersionAtLeast().

Referenced by ilUserImportParser\importEndTag(), and ilUserDataSet\importRecord().

3688  {
3689  $webspace_dir = ilUtil::getWebspaceDir();
3690  $image_dir = $webspace_dir . "/usr_images";
3691  $store_file = "usr_" . $obj_id . "." . "jpg";
3692 
3693  chmod($tmp_file, 0770);
3694 
3695  // take quality 100 to avoid jpeg artefacts when uploading jpeg files
3696  // taking only frame [0] to avoid problems with animated gifs
3697  $show_file = "$image_dir/usr_" . $obj_id . ".jpg";
3698  $thumb_file = "$image_dir/usr_" . $obj_id . "_small.jpg";
3699  $xthumb_file = "$image_dir/usr_" . $obj_id . "_xsmall.jpg";
3700  $xxthumb_file = "$image_dir/usr_" . $obj_id . "_xxsmall.jpg";
3701 
3702  if (ilUtil::isConvertVersionAtLeast("6.3.8-3")) {
3703  ilUtil::execConvert($tmp_file . "[0] -geometry 200x200^ -gravity center -extent 200x200 -quality 100 JPEG:" . $show_file);
3704  ilUtil::execConvert($tmp_file . "[0] -geometry 100x100^ -gravity center -extent 100x100 -quality 100 JPEG:" . $thumb_file);
3705  ilUtil::execConvert($tmp_file . "[0] -geometry 75x75^ -gravity center -extent 75x75 -quality 100 JPEG:" . $xthumb_file);
3706  ilUtil::execConvert($tmp_file . "[0] -geometry 30x30^ -gravity center -extent 30x30 -quality 100 JPEG:" . $xxthumb_file);
3707  } else {
3708  ilUtil::execConvert($tmp_file . "[0] -geometry 200x200 -quality 100 JPEG:" . $show_file);
3709  ilUtil::execConvert($tmp_file . "[0] -geometry 100x100 -quality 100 JPEG:" . $thumb_file);
3710  ilUtil::execConvert($tmp_file . "[0] -geometry 75x75 -quality 100 JPEG:" . $xthumb_file);
3711  ilUtil::execConvert($tmp_file . "[0] -geometry 30x30 -quality 100 JPEG:" . $xxthumb_file);
3712  }
3713 
3714  // store filename
3715  self::_writePref($obj_id, "profile_image", $store_file);
3716 
3717  return true;
3718  }
static isConvertVersionAtLeast($a_version)
Compare convert version numbers.
static execConvert($args)
execute convert command
static getWebspaceDir($mode="filesystem")
get webspace directory
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _verifyRegistrationHash()

static ilObjUser::_verifyRegistrationHash (   $a_hash)
static

Verifies a registration hash.

Exceptions
ilRegistrationHashExpiredException
ilRegistrationHashNotFoundException
Parameters
string$a_hashhashcode
Returns
integer user id of the user

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

References $DIC, $ilDB, and $res.

Referenced by ilStartUpGUI\_checkGoto().

4749  {
4750  global $DIC;
4751 
4752  $ilDB = $DIC['ilDB'];
4753 
4754  $res = $ilDB->queryf(
4755  '
4756  SELECT usr_id, create_date FROM usr_data
4757  WHERE reg_hash = %s',
4758  array('text'),
4759  array($a_hash)
4760  );
4761  while ($row = $ilDB->fetchAssoc($res)) {
4762  require_once 'Services/Registration/classes/class.ilRegistrationSettings.php';
4763  $oRegSettigs = new ilRegistrationSettings();
4764 
4765  if ((int) $oRegSettigs->getRegistrationHashLifetime() != 0 &&
4766  time() - (int) $oRegSettigs->getRegistrationHashLifetime() > strtotime($row['create_date'])) {
4767  require_once 'Services/Registration/exceptions/class.ilRegConfirmationLinkExpiredException.php';
4768  throw new ilRegConfirmationLinkExpiredException('reg_confirmation_hash_life_time_expired', $row['usr_id']);
4769  }
4770 
4771  $ilDB->manipulateF(
4772  '
4773  UPDATE usr_data
4774  SET reg_hash = %s
4775  WHERE usr_id = %s',
4776  array('text', 'integer'),
4777  array('', (int) $row['usr_id'])
4778  );
4779 
4780  return (int) $row['usr_id'];
4781  }
4782 
4783  require_once 'Services/Registration/exceptions/class.ilRegistrationHashNotFoundException.php';
4784  throw new ilRegistrationHashNotFoundException('reg_confirmation_hash_not_found');
4785  }
Class for user related exception handling in ILIAS.
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
Class ilObjAuthSettingsGUI.
global $ilDB
Class for user related exception handling in ILIAS.
+ Here is the caller graph for this function:

◆ _writeAuthMode()

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

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

References $DIC, and $ilDB.

Referenced by ilAuthProviderSaml\handleSamlAuth(), and ilObjUserTest\testAuthAndEmailMethods().

2072  {
2073  global $DIC;
2074 
2075  $ilDB = $DIC['ilDB'];
2076 
2077  $ilDB->manipulateF(
2078  "UPDATE usr_data " .
2079  " SET auth_mode = %s WHERE usr_id = %s",
2080  array("text", "integer"),
2081  array($a_auth_mode, $a_usr_id)
2082  );
2083  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _writeExternalAccount()

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

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

References $DIC, and $ilDB.

Referenced by ilObjUserTest\testAuthAndEmailMethods().

2058  {
2059  global $DIC;
2060 
2061  $ilDB = $DIC['ilDB'];
2062 
2063  $ilDB->manipulateF(
2064  "UPDATE usr_data " .
2065  " SET ext_account = %s WHERE usr_id = %s",
2066  array("text", "integer"),
2067  array($a_ext_id, $a_usr_id)
2068  );
2069  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _writeHistory()

static ilObjUser::_writeHistory (   $a_usr_id,
  $a_login 
)
static

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

References $DIC, $ilDB, ilObject\$log, ilObject\$rbacreview, $res, $timestamp, ANONYMOUS_USER_ID, ilUserAccountSettings\getInstance(), ilUserFilter\getInstance(), ilLoggerFactory\getLogger(), ilTermsOfServiceHelper\isEnabled(), and SYSTEM_USER_ID.

Referenced by updateLogin().

4572  {
4573  global $DIC;
4574 
4575  $ilDB = $DIC['ilDB'];
4576 
4577  $timestamp = time();
4578 
4579  $res = $ilDB->queryF(
4580  'SELECT * FROM loginname_history WHERE usr_id = %s AND login = %s AND history_date = %s',
4581  array('integer', 'text', 'integer'),
4582  array($a_usr_id, $a_login, $timestamp)
4583  );
4584 
4585  if ($ilDB->numRows($res) == 0) {
4586  $ilDB->manipulateF(
4587  '
4588  INSERT INTO loginname_history
4589  (usr_id, login, history_date)
4590  VALUES (%s, %s, %s)',
4591  array('integer', 'text', 'integer'),
4592  array($a_usr_id, $a_login, $timestamp)
4593  );
4594  }
4595 
4596  return true;
4597  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
foreach($mandatory_scripts as $file) $timestamp
Definition: buildRTE.php:81
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _writePref()

static ilObjUser::_writePref (   $a_usr_id,
  $a_keyword,
  $a_value 
)
static
Parameters
int$a_usr_id
string$a_keyword
string$a_value

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

References $DIC, and $ilDB.

Referenced by ilBadgeProfileGUI\saveSettings().

1160  {
1161  global $DIC;
1162 
1163  $ilDB = $DIC['ilDB'];
1164  $ilDB->replace(
1165  "usr_pref",
1166  array(
1167  "usr_id" => array("integer", $a_usr_id),
1168  "keyword" => array("text", $a_keyword),
1169  ),
1170  array(
1171  "value" => array("text",$a_value)
1172  )
1173  );
1174 
1175  /*
1176  self::_deletePref($a_usr_id, $a_keyword);
1177  if(strlen($a_value))
1178  {
1179  $ilDB->manipulateF(
1180  'INSERT INTO usr_pref (usr_id, keyword, value) VALUES (%s, %s, %s)',
1181  array('integer', 'text', 'text'),
1182  array($a_usr_id, $a_keyword, $a_value)
1183  );
1184  }*/
1185  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ activateDeletionFlag()

ilObjUser::activateDeletionFlag ( )

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

References writePref().

5255  {
5256  $this->writePref("delete_flag", true);
5257  }
writePref($a_keyword, $a_value)
write userpref to user table private
+ Here is the call graph for this function:

◆ addObjectToClipboard()

ilObjUser::addObjectToClipboard (   $a_item_id,
  $a_type,
  $a_title,
  $a_parent = 0,
  $a_time = 0,
  $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 3121 of file class.ilObjUser.php.

References $d, $DIC, $ilDB, and ilObject\getId().

3128  {
3129  global $DIC;
3130 
3131  $ilDB = $DIC['ilDB'];
3132 
3133  if ($a_time == 0) {
3134  $a_time = date("Y-m-d H:i:s", time());
3135  }
3136 
3137  $item_set = $ilDB->queryF(
3138  "SELECT * FROM personal_clipboard WHERE " .
3139  "parent = %s AND item_id = %s AND type = %s AND user_id = %s",
3140  array("integer", "integer", "text", "integer"),
3141  array(0, $a_item_id, $a_type, $this->getId())
3142  );
3143 
3144  // only insert if item is not already in clipboard
3145  if (!$d = $item_set->fetchRow()) {
3146  $ilDB->manipulateF(
3147  "INSERT INTO personal_clipboard " .
3148  "(item_id, type, user_id, title, parent, insert_time, order_nr) VALUES " .
3149  " (%s,%s,%s,%s,%s,%s,%s)",
3150  array("integer", "text", "integer", "text", "integer", "timestamp", "integer"),
3151  array($a_item_id, $a_type, $this->getId(), $a_title, (int) $a_parent, $a_time, (int) $a_order_nr)
3152  );
3153  } else {
3154  $ilDB->manipulateF(
3155  "UPDATE personal_clipboard SET insert_time = %s " .
3156  "WHERE user_id = %s AND item_id = %s AND type = %s AND parent = 0",
3157  array("timestamp", "integer", "integer", "text"),
3158  array($a_time, $this->getId(), $a_item_id, $a_type)
3159  );
3160  }
3161  }
getId()
get object id public
global $DIC
Definition: goto.php:24
global $ilDB
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296
+ Here is the call graph for this function:

◆ addToPCClipboard()

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

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

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

References $DIC, $ilDB, ilObject\getId(), and ilSession\set().

3167  {
3168  global $DIC;
3169 
3170  $ilDB = $DIC['ilDB'];
3171  if ($a_time == 0) {
3172  $a_time = date("Y-m-d H:i:s", time());
3173  }
3174  ilSession::set("user_pc_clip", true);
3175  $ilDB->insert("personal_pc_clipboard", array(
3176  "user_id" => array("integer", $this->getId()),
3177  "content" => array("clob", $a_content),
3178  "insert_time" => array("timestamp", $a_time),
3179  "order_nr" => array("integer", $a_nr)
3180  ));
3181  }
static set($a_var, $a_val)
Set a value.
getId()
get object id public
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the call graph for this function:

◆ addUserDefinedFieldEntry()

ilObjUser::addUserDefinedFieldEntry ( )

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

References $DIC, and $ilDB.

Referenced by assignData().

3932  {
3933  global $DIC;
3934 
3935  $ilDB = $DIC['ilDB'];
3936 
3937  // not needed. no entry in udf_text/udf_clob means no value
3938 
3939  /* $query = "INSERT INTO udf_data (usr_id ) ".
3940  "VALUES( ".
3941  $ilDB->quote($this->getId(),'integer').
3942  ")";
3943  $res = $ilDB->manipulate($query);
3944  */
3945  return true;
3946  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ assignData()

ilObjUser::assignData (   $a_data)

loads a record "user" from array public

Parameters
arrayuserdata

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

References $DIC, $ilDB, $ilErr, ilObject\$lng, $passwd, addUserDefinedFieldEntry(), getAuthMode(), getBirthday(), getExternalAccount(), ilUserPasswordManager\getInstance(), getPasswd(), getPasswordEncodingType(), getPasswordSalt(), getProfileIncomplete(), getStoredActive(), getTimeLimitFrom(), getTimeLimitMessage(), getTimeLimitOwner(), getTimeLimitUnlimited(), getTimeLimitUntil(), IL_PASSWD_CRYPTED, IL_PASSWD_PLAIN, login(), ilUtil\now(), read(), setAuthMode(), setBirthday(), setCity(), setClientIP(), setComment(), setCountry(), setDepartment(), setEmail(), setExternalAccount(), setFax(), setFirstLogin(), setFirstname(), setFullname(), setGender(), setHobby(), setInactivationDate(), setInstitution(), setIsSelfRegistered(), setLastLogin(), setLastname(), setLastProfilePrompt(), setLastUpdate(), setLatitude(), setLocationZoom(), setLogin(), setLongitude(), setMatriculation(), setPasswd(), setPasswordEncodingType(), setPasswordSalt(), setPhoneHome(), setPhoneMobile(), setPhoneOffice(), setProfileIncomplete(), setSecondEmail(), setSelectedCountry(), setStreet(), setTimeLimitFrom(), setTimeLimitMessage(), setTimeLimitOwner(), setTimeLimitUnlimited(), setTimeLimitUntil(), setUTitle(), setZipcode(), syncActive(), ilObject\update(), updateMultiTextFields(), updateUserDefinedFields(), and writePrefs().

Referenced by read().

345  {
346  global $DIC;
347 
348  $ilErr = $DIC['ilErr'];
349  $ilDB = $DIC['ilDB'];
350  $lng = $DIC['lng'];
351 
352  // basic personal data
353  $this->setLogin($a_data["login"]);
354  if (!$a_data["passwd_type"]) {
355  $ilErr->raiseError("<b>Error: passwd_type missing in function assignData(). " .
356  $this->id . "!</b><br />class: " . get_class($this) . "<br />Script: "
357  . __FILE__ . "<br />Line: " . __LINE__, $ilErr->FATAL);
358  }
359  if ($a_data["passwd"] != "********" and strlen($a_data['passwd'])) {
360  $this->setPasswd($a_data["passwd"], $a_data["passwd_type"]);
361  }
362 
363  $this->setGender($a_data["gender"]);
364  $this->setUTitle($a_data["title"]);
365  $this->setFirstname($a_data["firstname"]);
366  $this->setLastname($a_data["lastname"]);
367  $this->setFullname();
368  if (!is_array($a_data['birthday'])) {
369  $this->setBirthday($a_data['birthday']);
370  } else {
371  $this->setBirthday(null);
372  }
373 
374  // address data
375  $this->setInstitution($a_data["institution"]);
376  $this->setDepartment($a_data["department"]);
377  $this->setStreet($a_data["street"]);
378  $this->setCity($a_data["city"]);
379  $this->setZipcode($a_data["zipcode"]);
380  $this->setCountry($a_data["country"]);
381  $this->setSelectedCountry($a_data["sel_country"]);
382  $this->setPhoneOffice($a_data["phone_office"]);
383  $this->setPhoneHome($a_data["phone_home"]);
384  $this->setPhoneMobile($a_data["phone_mobile"]);
385  $this->setFax($a_data["fax"]);
386  $this->setMatriculation($a_data["matriculation"]);
387  $this->setEmail($a_data["email"]);
388  $this->setSecondEmail($a_data["second_email"]);
389  $this->setHobby($a_data["hobby"]);
390  $this->setClientIP($a_data["client_ip"]);
391  $this->setPasswordEncodingType($a_data['passwd_enc_type']);
392  $this->setPasswordSalt($a_data['passwd_salt']);
393 
394  // other data
395  $this->setLatitude($a_data["latitude"]);
396  $this->setLongitude($a_data["longitude"]);
397  $this->setLocationZoom($a_data["loc_zoom"]);
398 
399  // system data
400  $this->setLastLogin($a_data["last_login"]);
401  $this->setFirstLogin($a_data["first_login"]);
402  $this->setLastProfilePrompt($a_data["last_profile_prompt"]);
403  $this->setLastUpdate($a_data["last_update"]);
404  $this->create_date = $a_data["create_date"];
405  $this->setComment($a_data["referral_comment"]);
406  $this->approve_date = $a_data["approve_date"];
407  $this->active = $a_data["active"];
408  $this->agree_date = $a_data["agree_date"];
409 
410  $this->setInactivationDate($a_data["inactivation_date"]);
411 
412  // time limitation
413  $this->setTimeLimitOwner($a_data["time_limit_owner"]);
414  $this->setTimeLimitUnlimited($a_data["time_limit_unlimited"]);
415  $this->setTimeLimitFrom($a_data["time_limit_from"]);
416  $this->setTimeLimitUntil($a_data["time_limit_until"]);
417  $this->setTimeLimitMessage($a_data['time_limit_message']);
418 
419  // user profile incomplete?
420  $this->setProfileIncomplete($a_data["profile_incomplete"]);
421 
422  //authentication
423  $this->setAuthMode($a_data['auth_mode']);
424  $this->setExternalAccount($a_data['ext_account']);
425 
426  $this->setIsSelfRegistered((bool) $a_data['is_self_registered']);
427  }
setInstitution($a_str)
set institution public
setLatitude($a_latitude)
Set Latitude.
setDepartment($a_str)
set department public
setSelectedCountry($a_val)
Set selected country (selection drop down)
setFullname($a_title="", $a_firstname="", $a_lastname="")
builds a string with title + firstname + lastname method is used to build fullname in member variable...
setLastLogin($a_str)
set user&#39;s last login public
setProfileIncomplete($a_prof_inc)
setAuthMode($a_str)
set auth mode public
setFirstLogin($a_str)
set user&#39;s first login
setLastProfilePrompt($a_str)
set user&#39;s last profile prompt
setTimeLimitOwner($a_owner)
setBirthday($a_birthday)
setLastname($a_str)
set lastame public
setIsSelfRegistered($status)
setCountry($a_str)
Set country (free text)
setPhoneHome($a_str)
set home phone public
setTimeLimitUnlimited($a_unlimited)
$ilErr
Definition: raiseError.php:18
setInactivationDate($inactivation_date)
setter for inactivation date
setZipcode($a_str)
set zipcode public
setEmail($a_str)
set email public
setPasswd($a_str, $a_type=IL_PASSWD_PLAIN)
set password public
setTimeLimitUntil($a_until)
setLogin($a_str)
set login / username public
setExternalAccount($a_str)
set external account
setComment($a_str)
set referral comment public
setHobby($a_str)
set hobby public
global $DIC
Definition: goto.php:24
setLocationZoom($a_locationzoom)
Set Location Zoom.
setMatriculation($a_str)
set matriculation number public
setTimeLimitMessage($a_time_limit_message)
setSecondEmail($second_email)
setGender($a_str)
set gender public
setTimeLimitFrom($a_from)
setCity($a_str)
set city public
setPhoneOffice($a_str)
set office phone public
setClientIP($a_str)
set client ip number public
setFirstname($a_str)
set firstname public
setFax($a_str)
set fax public
global $ilDB
setPasswordSalt($password_salt)
setUTitle($a_str)
set user title (note: don&#39;t mix up this method with setTitle() that is derived from ilObject and sets...
setPasswordEncodingType($password_encryption_type)
setStreet($a_str)
set street public
setPhoneMobile($a_str)
set mobile phone public
setLastUpdate($a_str)
set last update of user data set public
setLongitude($a_longitude)
Set Longitude.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildTextFromArray()

ilObjUser::buildTextFromArray (   $a_attr)
protected

Convert multi-text values to plain text.

Parameters
string$a_attr
Returns
string

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

Referenced by getGeneralInterestsAsText(), getLookingForHelpAsText(), and getOfferingHelpAsText().

5384  {
5385  $current = $this->$a_attr;
5386  if (is_array($current) && sizeof($current)) {
5387  return implode(", ", $current);
5388  }
5389  }
+ Here is the caller graph for this function:

◆ checkTimeLimit()

ilObjUser::checkTimeLimit ( )

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

References getTimeLimitFrom(), getTimeLimitUnlimited(), and getTimeLimitUntil().

Referenced by ilAuthFrontend\checkTimeLimit().

2381  {
2382  if ($this->getTimeLimitUnlimited()) {
2383  return true;
2384  }
2385  if ($this->getTimeLimitFrom() < time() and $this->getTimeLimitUntil() > time()) {
2386  return true;
2387  }
2388  return false;
2389  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkUserId()

ilObjUser::checkUserId ( )

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

References $DIC, ilObject\$id, $ilSetting, $login, _lookupId(), and getLoginFromAuth().

2598  {
2599  global $DIC;
2600 
2601  $ilSetting = $DIC['ilSetting'];
2602 
2605  if ($id > 0) {
2606  return $id;
2607  }
2608  return false;
2609  }
$login
all user related data in single vars public
static _lookupId($a_user_str)
Lookup id by login.
static getLoginFromAuth()
Gets the username from $ilAuth, and converts it into an ILIAS login name.
global $DIC
Definition: goto.php:24
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:

◆ clipboardDeleteAll()

ilObjUser::clipboardDeleteAll ( )

Delete objects of type for user.

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

References $DIC, $ilDB, and ilObject\getId().

Referenced by delete().

3257  {
3258  global $DIC;
3259 
3260  $ilDB = $DIC['ilDB'];
3261 
3262  $ilDB->manipulateF("DELETE FROM personal_clipboard WHERE " .
3263  "user_id = %s", array("integer"), array($this->getId()));
3264  }
getId()
get object id public
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clipboardDeleteObjectsOfType()

ilObjUser::clipboardDeleteObjectsOfType (   $a_type)

Delete objects of type for user.

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

References $DIC, $ilDB, and ilObject\getId().

3240  {
3241  global $DIC;
3242 
3243  $ilDB = $DIC['ilDB'];
3244 
3245  $ilDB->manipulateF(
3246  "DELETE FROM personal_clipboard WHERE " .
3247  "type = %s AND user_id = %s",
3248  array("text", "integer"),
3249  array($a_type, $this->getId())
3250  );
3251  }
getId()
get object id public
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the call graph for this function:

◆ clipboardHasObjectsOfType()

ilObjUser::clipboardHasObjectsOfType (   $a_type)

Check whether clipboard has objects of a certain type.

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

References $DIC, $ilDB, and ilObject\getId().

3218  {
3219  global $DIC;
3220 
3221  $ilDB = $DIC['ilDB'];
3222 
3223  $set = $ilDB->queryF(
3224  "SELECT * FROM personal_clipboard WHERE " .
3225  "parent = %s AND type = %s AND user_id = %s",
3226  array("integer", "text", "integer"),
3227  array(0, $a_type, $this->getId())
3228  );
3229  if ($rec = $ilDB->fetchAssoc($set)) {
3230  return true;
3231  }
3232 
3233  return false;
3234  }
getId()
get object id public
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the call graph for this function:

◆ copyProfilePicturesToDirectory()

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

Get profile picture direcotory.

Parameters

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

References ilUtil\getWebspaceDir().

Referenced by ILIAS\Portfolio\Export\PortfolioHtmlExport\exportBanner(), ILIAS\Blog\Export\BlogHtmlExport\exportBanner(), and ilUserDataSet\getXmlRecord().

3784  {
3785  $a_dir = trim(str_replace("..", "", $a_dir));
3786  if ($a_dir == "" || !is_dir($a_dir)) {
3787  return;
3788  }
3789 
3790  $webspace_dir = ilUtil::getWebspaceDir();
3791  $image_dir = $webspace_dir . "/usr_images";
3792  $images = array(
3793  "upload_" . $a_user_id . "pic",
3794  "usr_" . $a_user_id . "." . "jpg",
3795  "usr_" . $a_user_id . "_small.jpg",
3796  "usr_" . $a_user_id . "_xsmall.jpg",
3797  "usr_" . $a_user_id . "_xxsmall.jpg",
3798  "upload_" . $a_user_id);
3799  foreach ($images as $image) {
3800  if (is_file($image_dir . "/" . $image)) {
3801  copy($image_dir . "/" . $image, $a_dir . "/" . $image);
3802  }
3803  }
3804  }
static getWebspaceDir($mode="filesystem")
get webspace directory
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ delete()

ilObjUser::delete ( )

deletes a user public

Parameters
integeruser_id

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

References $DIC, $ilDB, ilObject\$rbacadmin, ilObject\$tree, _deleteAllPref(), ilEventParticipants\_deleteByUser(), ilBlockSetting\_deleteSettingsOfUser(), ilLinkCheckNotify\_deleteUser(), ilObjUserTracking\_deleteUser(), ilObjForum\_deleteUser(), ilObjCourse\_deleteUser(), ilSession\_destroyByUserId(), ilLDAPRoleGroupMapping\_getInstance(), ilSCORM13Package\_removeTrackingDataForUser(), ilObjSCORMLearningModule\_removeTrackingDataForUser(), clipboardDeleteAll(), ilBadgeAssignment\deleteByUserId(), deleteMultiTextFields(), deleteUserDefinedFieldEntries(), ilObjPortfolio\deleteUserPortfolios(), ilObject\getId(), ilOrgUnitUserAssignmentQueries\getInstance(), getLogin(), ilNotification\removeForUser(), ilCronDeleteInactiveUserReminderMail\removeSingleUserFromTable(), removeUserPicture(), and resetOwner().

1320  {
1321  global $DIC;
1322 
1323  $rbacadmin = $DIC->rbac()->admin();
1324  $ilDB = $DIC['ilDB'];
1325 
1326  // deassign from ldap groups
1327  include_once('Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
1329  $mapping->deleteUser($this->getId());
1330 
1331  // remove mailbox / update sent mails
1332  include_once("Services/Mail/classes/class.ilMailbox.php");
1333  $mailbox = new ilMailbox($this->getId());
1334  $mailbox->delete();
1335  $mailbox->updateMailsOfDeletedUser($this->getLogin());
1336 
1337  // delete feed blocks on personal desktop
1338  include_once("./Services/Block/classes/class.ilCustomBlock.php");
1339  $costum_block = new ilCustomBlock();
1340  $costum_block->setContextObjId($this->getId());
1341  $costum_block->setContextObjType("user");
1342  $c_blocks = $costum_block->queryBlocksForContext();
1343  include_once("./Services/Feeds/classes/class.ilPDExternalFeedBlock.php");
1344  foreach ($c_blocks as $c_block) {
1345  if ($c_block["type"] == "pdfeed") {
1346  $fb = new ilPDExternalFeedBlock($c_block["id"]);
1347  $fb->delete();
1348  }
1349  }
1350 
1351 
1352  // delete block settings
1353  include_once("./Services/Block/classes/class.ilBlockSetting.php");
1355 
1356  // delete user_account
1357  $ilDB->manipulateF(
1358  "DELETE FROM usr_data WHERE usr_id = %s",
1359  array("integer"),
1360  array($this->getId())
1361  );
1362 
1363  $this->deleteMultiTextFields();
1364 
1365  // delete user_prefs
1366  ilObjUser::_deleteAllPref($this->getId());
1367 
1368  $this->removeUserPicture(false); // #8597
1369 
1370  // delete user_session
1371  include_once("./Services/Authentication/classes/class.ilSession.php");
1373 
1374  // remove user from rbac
1375  $rbacadmin->removeUser($this->getId());
1376 
1377  // remove bookmarks
1378  // TODO: move this to class.ilBookmarkFolder
1379  $q = "DELETE FROM bookmark_tree WHERE tree = " .
1380  $ilDB->quote($this->getId(), "integer");
1381  $ilDB->manipulate($q);
1382 
1383  $q = "DELETE FROM bookmark_data WHERE user_id = " .
1384  $ilDB->quote($this->getId(), "integer");
1385  $ilDB->manipulate($q);
1386 
1387  // DELETE FORUM ENTRIES (not complete in the moment)
1388  include_once './Modules/Forum/classes/class.ilObjForum.php';
1389  ilObjForum::_deleteUser($this->getId());
1390 
1391  // Delete link check notify entries
1392  include_once './Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
1394 
1395  // Delete crs entries
1396  include_once './Modules/Course/classes/class.ilObjCourse.php';
1397  ilObjCourse::_deleteUser($this->getId());
1398 
1399  // Delete user tracking
1400  include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
1402 
1403  include_once 'Modules/Session/classes/class.ilEventParticipants.php';
1405 
1406  // Delete Tracking data SCORM 2004 RTE
1407  include_once 'Modules/Scorm2004/classes/ilSCORM13Package.php';
1409 
1410  // Delete Tracking data SCORM 1.2 RTE
1411  include_once 'Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php';
1413 
1414  // remove all notifications
1415  include_once "./Services/Notification/classes/class.ilNotification.php";
1417 
1418  // remove portfolios
1419  include_once "./Modules/Portfolio/classes/class.ilObjPortfolio.php";
1421 
1422  // remove workspace
1423  include_once "./Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
1424  $tree = new ilWorkspaceTree($this->getId());
1425  $tree->cascadingDelete();
1426 
1427  // remove reminder entries
1428  require_once 'Services/User/classes/class.ilCronDeleteInactiveUserReminderMail.php';
1430 
1431  // badges
1432  include_once "Services/Badge/classes/class.ilBadgeAssignment.php";
1434 
1435  // remove org unit assignments
1436  $ilOrgUnitUserAssignmentQueries = ilOrgUnitUserAssignmentQueries::getInstance();
1437  $ilOrgUnitUserAssignmentQueries->deleteAllAssignmentsOfUser($this->getId());
1438 
1439  // Delete user defined field entries
1441 
1442  // Delete clipboard entries
1443  $this->clipboardDeleteAll();
1444 
1445  // Reset owner
1446  $this->resetOwner();
1447 
1448  // Trigger deleteUser Event
1449  global $DIC;
1450 
1451  $ilAppEventHandler = $DIC['ilAppEventHandler'];
1452  $ilAppEventHandler->raise(
1453  'Services/User',
1454  'deleteUser',
1455  array('usr_id' => $this->getId())
1456  );
1457 
1458  // delete object data
1459  parent::delete();
1460  return true;
1461  }
getLogin()
get login / username public
static _deleteUser($a_usr_id)
clipboardDeleteAll()
Delete objects of type for user.
static _deleteSettingsOfUser($a_user)
Delete block settings of user.
removeUserPicture($a_do_update=true)
Remove user picture.
Custom block for external feeds on personal desktop.
deleteUserDefinedFieldEntries()
Tree handler for personal workspace.
static removeForUser($user_id)
Remove all notifications for given user.
static _getInstance()
Get singleton instance of this class.
getId()
get object id public
Mail Box class Base class for creating and handling mail boxes.
global $DIC
Definition: goto.php:24
static _removeTrackingDataForUser($user_id)
static _destroyByUserId($a_user_id)
Destroy session.
This is the super class of all custom blocks.
deleteMultiTextFields()
Remove multi-text values from DB.
static _deleteUser($a_usr_id)
global $ilDB
static _deleteUser($a_usr_id)
static deleteByUserId($a_user_id)
static deleteUserPortfolios($a_user_id)
Delete all portfolio data for user.
static _deleteAllPref($a_user_id)
Deletes a userpref value of the user from the database public.
static _deleteUser($a_usr_id)
+ Here is the call graph for this function:

◆ deleteMultiTextFields()

ilObjUser::deleteMultiTextFields ( )
protected

Remove multi-text values from DB.

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

References $DIC, $ilDB, and ilObject\getId().

Referenced by delete(), and updateMultiTextFields().

5478  {
5479  global $DIC;
5480 
5481  $ilDB = $DIC['ilDB'];
5482 
5483  if (!$this->getId()) {
5484  return;
5485  }
5486 
5487  $ilDB->manipulate("DELETE FROM usr_data_multi" .
5488  " WHERE usr_id = " . $ilDB->quote($this->getId(), "integer"));
5489  }
getId()
get object id public
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deletePref()

ilObjUser::deletePref (   $a_keyword)

Deletes a userpref value of the user from the database public.

Parameters
stringkeyword

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

References $DIC, $ilDB, and ilObject\getId().

1110  {
1111  self::_deletePref($this->getId(), $a_keyword);
1112  }
getId()
get object id public
+ Here is the call graph for this function:

◆ deleteUserDefinedFieldEntries()

ilObjUser::deleteUserDefinedFieldEntries ( )

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

References $data, $DIC, $ilDB, ilObject\$lng, ilObject\$rbacreview, $user_defined_data, ilUserDefinedFields\_getInstance(), ilObject\_lookupTitle(), ilUserDefinedData\deleteEntriesOfUser(), ilDatePresentation\formatDate(), ilDatePresentation\formatPeriod(), getCity(), getComment(), getCountry(), ilObject\getCreateDate(), getDepartment(), getEmail(), getFax(), getFirstname(), getGender(), getHobby(), ilObject\getId(), getInstitution(), getLastname(), getLogin(), getMatriculation(), getPhoneHome(), getPhoneMobile(), getPhoneOffice(), getSecondEmail(), getSelectedCountry(), getStreet(), getTimeLimitFrom(), getTimeLimitUnlimited(), getTimeLimitUntil(), getUserDefinedData(), getUTitle(), getZipcode(), IL_CAL_DATETIME, IL_CAL_UNIX, ilDatePresentation\resetToDefaults(), ilDatePresentation\setLanguage(), ilDatePresentation\setUseRelativeDates(), and UDF_TYPE_WYSIWYG.

Referenced by delete().

3949  {
3950  global $DIC;
3951 
3952  $ilDB = $DIC['ilDB'];
3953 
3954  include_once("./Services/User/classes/class.ilUserDefinedData.php");
3956 
3957  // wrong place...
3958  /* $query = "DELETE FROM udf_data ".
3959  "WHERE usr_id = ".$ilDB->quote($this->getId(),'integer');
3960  $res = $ilDB->manipulate($query);*/
3961 
3962  return true;
3963  }
getId()
get object id public
global $DIC
Definition: goto.php:24
static deleteEntriesOfUser($a_user_id)
Delete data of user.
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportPersonalData()

ilObjUser::exportPersonalData ( )

Export personal data.

Parameters

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

References ilObject\$title, ilExport\_getExportDirectory(), ilUtil\delDir(), ilObject\getId(), getLastname(), and getLogin().

5012  {
5013  include_once("./Services/Export/classes/class.ilExport.php");
5014  $exp = new ilExport();
5015  $dir = ilExport::_getExportDirectory($this->getId(), "xml", "usr", "personal_data");
5016  ilUtil::delDir($dir, true);
5017  $title = $this->getLastname() . ", " . $this->getLastname() . " [" . $this->getLogin() . "]";
5018  $exp->exportEntity(
5019  "personal_data",
5020  $this->getId(),
5021  "",
5022  "Services/User",
5023  $title,
5024  $dir
5025  );
5026  }
getLogin()
get login / username public
getLastname()
get lastname public
getId()
get object id public
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
+ Here is the call graph for this function:

◆ findInterests()

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

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

References $DIC, $ilDB, and $res.

Referenced by ilPublicUserProfileGUI\getAutocompleteResult().

5492  {
5493  global $DIC;
5494 
5495  $ilDB = $DIC['ilDB'];
5496 
5497  $res = array();
5498 
5499  $sql = "SELECT DISTINCT(value)" .
5500  " FROM usr_data_multi" .
5501  " WHERE " . $ilDB->like("value", "text", "%" . $a_term . "%");
5502  if ($a_field_id) {
5503  $sql .= " AND field_id = " . $ilDB->quote($a_field_id, "text");
5504  }
5505  if ($a_user_id) {
5506  $sql .= " AND usr_id <> " . $ilDB->quote($a_user_id, "integer");
5507  }
5508  $sql .= " ORDER BY value";
5509  $set = $ilDB->query($sql);
5510  while ($row = $ilDB->fetchAssoc($set)) {
5511  $res[] = $row["value"];
5512  }
5513 
5514  return $res;
5515  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ getActive()

ilObjUser::getActive ( )

get user active state public

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

References $active.

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

2259  {
2260  return $this->active;
2261  }
+ Here is the caller graph for this function:

◆ getAgreeDate()

ilObjUser::getAgreeDate ( )

get the date when the user accepted the user agreement public

Returns
string date of last update

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

References $agree_date.

Referenced by ilTermsOfServiceHelper\hasToResignAcceptance().

2220  {
2221  return $this->agree_date;
2222  }
+ Here is the caller graph for this function:

◆ getApproveDate()

ilObjUser::getApproveDate ( )

get the date when the user account was approved public

Returns
string approve date

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

References $approve_date.

Referenced by ilSoapUserAdministration\__readUserData().

2210  {
2211  return $this->approve_date;
2212  }
+ Here is the caller graph for this function:

◆ getAuthMode()

ilObjUser::getAuthMode (   $a_auth_key = false)

get auth mode public

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

References $auth_mode, and ilAuthUtils\_getAuthMode().

Referenced by ilSoapUserAdministration\__readUserData(), assignData(), ilECSAppEventListener\handleMembership(), isPasswordChangeDemanded(), and isPasswordExpired().

3435  {
3436  if (!$a_auth_key) {
3437  return $this->auth_mode;
3438  }
3439 
3440  include_once('./Services/Authentication/classes/class.ilAuthUtils.php');
3441  return ilAuthUtils::_getAuthMode($this->auth_mode);
3442  }
static _getAuthMode($a_auth_mode, $a_db_handler='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAvatar()

ilObjUser::getAvatar ( )

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

References ilObject\getId().

3740  : Avatar
3741  {
3742  return self::_getAvatar($this->getId());
3743  }
getId()
get object id public
This describes how a letter or a picture avatar could be modified during construction of UI...
Definition: Avatar.php:8
+ Here is the call graph for this function:

◆ getBirthday()

ilObjUser::getBirthday ( )

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

References $birthday.

Referenced by assignData().

4798  {
4799  return $this->birthday;
4800  }
+ Here is the caller graph for this function:

◆ getCity()

ilObjUser::getCity ( )

get city public

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

References $city.

Referenced by ilSoapUserAdministration\__readUserData(), ilPersonalProfileGUI\addLocationToForm(), and deleteUserDefinedFieldEntries().

1738  {
1739  return $this->city;
1740  }
+ Here is the caller graph for this function:

◆ getClientIP()

ilObjUser::getClientIP ( )

get client ip number public

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

References $client_ip.

Referenced by ilAuthFrontend\checkIp().

1893  {
1894  return $this->client_ip;
1895  }
+ Here is the caller graph for this function:

◆ getClipboardChilds()

ilObjUser::getClipboardChilds (   $a_parent,
  $a_insert_time 
)

Get childs of an item.

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

References $DIC, $ilDB, $ilUser, and ilObject\_lookupTitle().

3314  {
3315  global $DIC;
3316 
3317  $ilDB = $DIC['ilDB'];
3318  $ilUser = $DIC['ilUser'];
3319 
3320  $objs = $ilDB->queryF(
3321  "SELECT * FROM personal_clipboard WHERE " .
3322  "user_id = %s AND parent = %s AND insert_time = %s " .
3323  " ORDER BY order_nr",
3324  array("integer", "integer", "timestamp"),
3325  array($ilUser->getId(), (int) $a_parent, $a_insert_time)
3326  );
3327  $objects = array();
3328  while ($obj = $ilDB->fetchAssoc($objs)) {
3329  if ($obj["type"] == "mob") {
3330  $obj["title"] = ilObject::_lookupTitle($obj["item_id"]);
3331  }
3332  $objects[] = array("id" => $obj["item_id"],
3333  "type" => $obj["type"], "title" => $obj["title"], "insert_time" => $obj["insert_time"]);
3334  }
3335  return $objects;
3336  }
static _lookupTitle($a_id)
lookup object title
global $DIC
Definition: goto.php:24
global $ilDB
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:

◆ getClipboardObjects()

ilObjUser::getClipboardObjects (   $a_type = "",
  $a_top_nodes_only = false 
)

get all clipboard objects of user and specified type

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

References $DIC, $ilDB, ilPageObject\_exists(), ilObject\_lookupTitle(), ilObject\_lookupType(), ilObject\getId(), and ilMediaPoolPage\lookupTitle().

3270  {
3271  global $DIC;
3272 
3273  $ilDB = $DIC['ilDB'];
3274 
3275  $par = "";
3276  if ($a_top_nodes_only) {
3277  $par = " AND parent = " . $ilDB->quote(0, "integer") . " ";
3278  }
3279 
3280  $type_str = ($a_type != "")
3281  ? " AND type = " . $ilDB->quote($a_type, "text") . " "
3282  : "";
3283  $q = "SELECT * FROM personal_clipboard WHERE " .
3284  "user_id = " . $ilDB->quote($this->getId(), "integer") . " " .
3285  $type_str . $par .
3286  " ORDER BY order_nr";
3287  $objs = $ilDB->query($q);
3288  $objects = array();
3289  while ($obj = $ilDB->fetchAssoc($objs)) {
3290  if ($obj["type"] == "mob") {
3291  $obj["title"] = ilObject::_lookupTitle($obj["item_id"]);
3292  if (ilObject::_lookupType((int) $obj["item_id"]) !== "mob") {
3293  continue;
3294  }
3295  }
3296  if ($obj["type"] == "incl") {
3297  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
3298  $obj["title"] = ilMediaPoolPage::lookupTitle($obj["item_id"]);
3299  if (!ilPageObject::_exists("mep", (int) $obj["item_id"], "-")) {
3300  continue;
3301  }
3302  }
3303  $objects[] = array("id" => $obj["item_id"],
3304  "type" => $obj["type"], "title" => $obj["title"],
3305  "insert_time" => $obj["insert_time"]);
3306  }
3307  return $objects;
3308  }
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
static _lookupTitle($a_id)
lookup object title
static lookupTitle($a_page_id)
Lookup title.
getId()
get object id public
global $DIC
Definition: goto.php:24
static _lookupType($a_id, $a_reference=false)
lookup object type
global $ilDB
+ Here is the call graph for this function:

◆ getComment()

ilObjUser::getComment ( )

get referral comment public

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

References $referral_comment.

Referenced by ilSoapUserAdministration\__readUserData(), and deleteUserDefinedFieldEntries().

2189  {
2190  return $this->referral_comment;
2191  }
+ Here is the caller graph for this function:

◆ getCountry()

ilObjUser::getCountry ( )

Get country (free text)

public

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

References $country.

Referenced by ilSoapUserAdministration\__readUserData(), ilPersonalProfileGUI\addLocationToForm(), and deleteUserDefinedFieldEntries().

1778  {
1779  return $this->country;
1780  }
+ 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 2089 of file class.ilObjUser.php.

References $_SESSION.

2090  {
2091  return $_SESSION['lang'];
2092  }
$_SESSION["AccountId"]

◆ getDateFormat()

ilObjUser::getDateFormat ( )

get date format

public

Returns

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

References $format, ilCalendarSettings\_getInstance(), and getPref().

1244  {
1245  if ($format = $this->getPref('date_format')) {
1246  return $format;
1247  } else {
1248  include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
1250  return $settings->getDefaultDateFormat();
1251  }
1252  }
static _getInstance()
get singleton instance
getPref($a_keyword)
get a user preference
$format
Definition: metadata.php:218
+ Here is the call graph for this function:

◆ getDepartment()

ilObjUser::getDepartment ( )

get department public

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

References $department.

Referenced by ilSoapUserAdministration\__readUserData(), and deleteUserDefinedFieldEntries().

1700  {
1701  return $this->department;
1702  }
+ Here is the caller graph for this function:

◆ getEmail()

◆ getExternalAccount()

ilObjUser::getExternalAccount ( )

get external account

note: 3.7.0 uses this field only for cas and soap authentication.

public

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

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

3464  {
3465  return $this->ext_account;
3466  }
+ Here is the caller graph for this function:

◆ getFax()

ilObjUser::getFax ( )

get fax public

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

References $fax.

Referenced by ilSoapUserAdministration\__readUserData(), and deleteUserDefinedFieldEntries().

1874  {
1875  return $this->fax;
1876  }
+ Here is the caller graph for this function:

◆ getFirstLettersOfLastnames()

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

Get first letters of all lastnames.

Parameters
int[]$user_ids
Returns
mixed

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

References $DIC, $ilDB, and ANONYMOUS_USER_ID.

Referenced by ilObjUserFolderGUI\viewObject().

4952  {
4953  global $DIC;
4954 
4955  $ilDB = $DIC->database();
4956 
4957  $q = "SELECT DISTINCT " . $ilDB->upper($ilDB->substr("lastname", 1, 1)) . " let" .
4958  " FROM usr_data" .
4959  " WHERE usr_id <> " . $ilDB->quote(ANONYMOUS_USER_ID, "integer") .
4960  ($user_ids !== null ? " AND " . $ilDB->in('usr_id', $user_ids, false, "integer") : "") .
4961  " ORDER BY let";
4962  $let_set = $ilDB->query($q);
4963 
4964  $lets = array();
4965  while ($let_rec = $ilDB->fetchAssoc($let_set)) {
4966  $let[$let_rec["let"]] = $let_rec["let"];
4967  }
4968  return $let;
4969  }
const ANONYMOUS_USER_ID
Definition: constants.php:25
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ getFirstLogin()

ilObjUser::getFirstLogin ( )

returns first login date

Returns
string date

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

References $first_login.

Referenced by refreshLogin().

2138  {
2139  return $this->first_login;
2140  }
+ Here is the caller graph for this function:

◆ getFirstname()

ilObjUser::getFirstname ( )

get firstname public

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

References $firstname.

Referenced by ilSoapUserAdministration\__readUserData(), ilIndividualAssessmentMembers\buildNewRecordOfUser(), deleteUserDefinedFieldEntries(), ilCmiXapiUser\getName(), getPublicName(), and shibUser\returnNewLoginName().

1643  {
1644  return $this->firstname;
1645  }
+ Here is the caller graph for this function:

◆ getFullname()

ilObjUser::getFullname (   $a_max_strlen = 0)

get fullname public

Parameters
integermax. 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 1509 of file class.ilObjUser.php.

References ilUtil\stripSlashes().

Referenced by ilIndividualAssessmentMembersStorageDB\createAssessmentMember(), shibUser\createFields(), ilCmiXapiUser\getName(), and ilAccountRegistrationMail\sendLanguageVariableBasedAccountMail().

1510  {
1511  if (!$a_max_strlen) {
1512  return ilUtil::stripSlashes($this->fullname);
1513  }
1514 
1515  if (strlen($this->fullname) <= $a_max_strlen) {
1516  return ilUtil::stripSlashes($this->fullname);
1517  }
1518 
1519  if ((strlen($this->utitle) + strlen($this->lastname) + 4) <= $a_max_strlen) {
1520  return ilUtil::stripSlashes($this->utitle . " " . substr($this->firstname, 0, 1) . ". " . $this->lastname);
1521  }
1522 
1523  if ((strlen($this->firstname) + strlen($this->lastname) + 1) <= $a_max_strlen) {
1524  return ilUtil::stripSlashes($this->firstname . " " . $this->lastname);
1525  }
1526 
1527  if ((strlen($this->lastname) + 3) <= $a_max_strlen) {
1528  return ilUtil::stripSlashes(substr($this->firstname, 0, 1) . ". " . $this->lastname);
1529  }
1530 
1531  return ilUtil::stripSlashes(substr($this->lastname, 0, $a_max_strlen));
1532  }
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGender()

ilObjUser::getGender ( )

get gender public

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

References $gender.

Referenced by ilSoapUserAdministration\__readUserData(), and deleteUserDefinedFieldEntries().

1601  {
1602  return $this->gender;
1603  }
+ Here is the caller graph for this function:

◆ getGeneralInterests()

ilObjUser::getGeneralInterests ( )

Get general interests.

Returns
array $value

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

References $interests_general.

Referenced by updateMultiTextFields().

5303  {
5304  return $this->interests_general;
5305  }
+ Here is the caller graph for this function:

◆ getGeneralInterestsAsText()

ilObjUser::getGeneralInterestsAsText ( )

Get general interests as plain text.

Returns
string

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

References buildTextFromArray().

5313  {
5314  return $this->buildTextFromArray("interests_general");
5315  }
buildTextFromArray($a_attr)
Convert multi-text values to plain text.
+ Here is the call graph for this function:

◆ getHobby()

ilObjUser::getHobby ( )

get hobby public

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

References $hobby.

Referenced by ilSoapUserAdministration\__readUserData(), and deleteUserDefinedFieldEntries().

1985  {
1986  return $this->hobby;
1987  }
+ Here is the caller graph for this function:

◆ getInactivationDate()

ilObjUser::getInactivationDate ( )

getter for inactivation date

Returns
string $inactivation_date

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

References $inactivation_date.

5166  {
5167  return $this->inactivation_date;
5168  }

◆ getInstitution()

ilObjUser::getInstitution ( )

get institution public

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

References $institution.

Referenced by ilSoapUserAdministration\__readUserData(), and deleteUserDefinedFieldEntries().

1681  {
1682  return $this->institution;
1683  }
+ Here is the caller graph for this function:

◆ getLanguage()

◆ getLastLogin()

ilObjUser::getLastLogin ( )

returns last login date public

Returns
string date

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

Referenced by ilSoapUserAdministration\__readUserData().

2120  {
2121  return $this->last_login;
2122  }
+ Here is the caller graph for this function:

◆ getLastname()

ilObjUser::getLastname ( )

◆ getLastPasswordChangeTS()

ilObjUser::getLastPasswordChangeTS ( )

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

References $last_password_change_ts.

Referenced by getPasswordAge(), isPasswordChangeDemanded(), isPasswordExpired(), and setLastPasswordChangeToNow().

2016  {
2018  }
+ Here is the caller graph for this function:

◆ getLastProfilePrompt()

ilObjUser::getLastProfilePrompt ( )

returns user's last profile prompt

Returns
string ast profile prompt timestamp

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

References $last_profile_prompt.

2156  {
2158  }

◆ getLastUpdate()

ilObjUser::getLastUpdate ( )

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

References ilObject\$last_update.

Referenced by ilSoapUserAdministration\__readUserData().

2170  {
2171  return $this->last_update;
2172  }
+ Here is the caller graph for this function:

◆ getLatitude()

ilObjUser::getLatitude ( )

Get Latitude.

Returns
string Latitude

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

References $latitude.

Referenced by ilPersonalProfileGUI\addLocationToForm().

2526  {
2527  return $this->latitude;
2528  }
+ Here is the caller graph for this function:

◆ getLocationZoom()

ilObjUser::getLocationZoom ( )

Get Location Zoom.

Returns
int Location Zoom

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

References $loc_zoom.

Referenced by ilPersonalProfileGUI\addLocationToForm().

2566  {
2567  return $this->loc_zoom;
2568  }
+ Here is the caller graph for this function:

◆ getLogin()

◆ getLoginAttempts()

ilObjUser::getLoginAttempts ( )

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

References $login_attempts.

2375  {
2376  return $this->login_attempts;
2377  }

◆ getLoginByUserId()

ilObjUser::getLoginByUserId (   $a_userid)

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

References $login, and _lookupLogin().

2753  {
2754  $login = ilObjUser::_lookupLogin($a_userid);
2755  return $login ? $login : false;
2756  }
static _lookupLogin($a_user_id)
lookup login
$login
all user related data in single vars public
+ Here is the call graph for this function:

◆ getLoginFromAuth()

static ilObjUser::getLoginFromAuth ( )
staticprivate

Gets the username from $ilAuth, and converts it into an ILIAS login name.

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

References $GLOBALS, $login, ilDAVActivationChecker\_isActive(), and _lookupLogin().

Referenced by checkUserId(), isCurrentUserActive(), and syncActive().

2615  {
2616  $uid = $GLOBALS['DIC']['ilAuthSession']->getUserId();
2618 
2619  // BEGIN WebDAV: Strip Microsoft Domain Names from logins
2620  require_once('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
2622  $login = self::toUsernameWithoutDomain($login);
2623  }
2624  return $login;
2625  }
static _lookupLogin($a_user_id)
lookup login
$login
all user related data in single vars public
static _isActive()
Static getter.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLongitude()

ilObjUser::getLongitude ( )

Get Longitude.

Returns
string Longitude

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

References $longitude.

Referenced by ilPersonalProfileGUI\addLocationToForm().

2546  {
2547  return $this->longitude;
2548  }
+ Here is the caller graph for this function:

◆ getLookingForHelp()

ilObjUser::getLookingForHelp ( )

Get help looking for.

Returns
array $value

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

References $interests_help_looking.

Referenced by updateMultiTextFields().

5363  {
5365  }
+ Here is the caller graph for this function:

◆ getLookingForHelpAsText()

ilObjUser::getLookingForHelpAsText ( )

Get help looking for as plain text.

Returns
string

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

References buildTextFromArray().

5373  {
5374  return $this->buildTextFromArray("interests_help_looking");
5375  }
buildTextFromArray($a_attr)
Convert multi-text values to plain text.
+ Here is the call graph for this function:

◆ getMatriculation()

ilObjUser::getMatriculation ( )

get matriculation number public

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

References $matriculation.

Referenced by ilSoapUserAdministration\__readUserData(), and deleteUserDefinedFieldEntries().

1912  {
1913  return $this->matriculation;
1914  }
+ Here is the caller graph for this function:

◆ getOfferingHelp()

ilObjUser::getOfferingHelp ( )

Get help offering.

Returns
array $value

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

References $interests_help_offered.

Referenced by updateMultiTextFields().

5333  {
5335  }
+ Here is the caller graph for this function:

◆ getOfferingHelpAsText()

ilObjUser::getOfferingHelpAsText ( )

Get help offering as plain text.

Returns
string

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

References buildTextFromArray().

5343  {
5344  return $this->buildTextFromArray("interests_help_offered");
5345  }
buildTextFromArray($a_attr)
Convert multi-text values to plain text.
+ Here is the call graph for this function:

◆ getOrgUnitsRepresentation()

ilObjUser::getOrgUnitsRepresentation ( )
Returns
String

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

References ilObject\getId().

3416  {
3417  return self::lookupOrgUnitsRepresentation($this->getId());
3418  }
getId()
get object id public
+ Here is the call graph for this function:

◆ getPasswd()

ilObjUser::getPasswd ( )

get password

Returns
password. The password is encoded depending on the current password type. public
See also
getPasswdType

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

References $passwd.

Referenced by ilSoapUserAdministration\__readUserData(), assignData(), refreshLogin(), and ilUserPasswordManager\verifyPassword().

1572  {
1573  return $this->passwd;
1574  }
+ Here is the caller graph for this function:

◆ getPasswdType()

ilObjUser::getPasswdType ( )

get password type

Returns
password type (IL_PASSWD_PLAIN, IL_PASSWD_CRYPTED). public
See also
getPasswd

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

References $passwd_type.

Referenced by ilSoapUserAdministration\__readUserData().

1582  {
1583  return $this->passwd_type;
1584  }
+ Here is the caller graph for this function:

◆ getPasswordAge()

ilObjUser::getPasswordAge ( )

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

References getLastPasswordChangeTS().

2461  {
2462  $current_ts = time();
2463  $pass_change_ts = $this->getLastPasswordChangeTS();
2464  $password_age = (int) (($current_ts - $pass_change_ts) / 86400);
2465  return $password_age;
2466  }
+ Here is the call graph for this function:

◆ getPasswordEncodingType()

ilObjUser::getPasswordEncodingType ( )
Returns
string

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

References $password_encoding_type.

Referenced by assignData(), refreshLogin(), and ilUserPasswordManager\verifyPassword().

311  {
313  }
+ Here is the caller graph for this function:

◆ getPasswordPolicyResetStatus()

ilObjUser::getPasswordPolicyResetStatus ( )
Returns
int

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

References $passwd_policy_reset.

Referenced by isPasswordChangeDemanded().

2023  : bool
2024  {
2025  return (bool) $this->passwd_policy_reset;
2026  }
+ Here is the caller graph for this function:

◆ getPasswordSalt()

ilObjUser::getPasswordSalt ( )
Returns
string|null

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

References $password_salt.

Referenced by assignData(), ilUserPasswordManager\encodePassword(), refreshLogin(), and ilUserPasswordManager\verifyPassword().

327  {
328  return $this->password_salt;
329  }
+ Here is the caller graph for this function:

◆ getPCClipboardContent()

ilObjUser::getPCClipboardContent ( )

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

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

References $DIC, $ilDB, ilSession\get(), and ilObject\getId().

3187  {
3188  global $DIC;
3189 
3190  $ilDB = $DIC['ilDB'];
3191 
3192  if (!ilSession::get("user_pc_clip")) {
3193  return [];
3194  }
3195 
3196  $set = $ilDB->queryF("SELECT MAX(insert_time) mtime FROM personal_pc_clipboard " .
3197  " WHERE user_id = %s", array("integer"), array($this->getId()));
3198  $row = $ilDB->fetchAssoc($set);
3199 
3200  $set = $ilDB->queryF(
3201  "SELECT * FROM personal_pc_clipboard " .
3202  " WHERE user_id = %s AND insert_time = %s ORDER BY order_nr ASC",
3203  array("integer", "timestamp"),
3204  array($this->getId(), $row["mtime"])
3205  );
3206  $content = array();
3207  while ($row = $ilDB->fetchAssoc($set)) {
3208  $content[] = $row["content"];
3209  }
3210 
3211  return $content;
3212  }
static get($a_var)
Get a value.
getId()
get object id public
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the call graph for this function:

◆ getPersonalDataExportFile()

ilObjUser::getPersonalDataExportFile ( )

Get personal data export file.

Parameters

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

References ilExport\_getExportDirectory(), ilUtil\getDir(), and ilObject\getId().

Referenced by sendPersonalDataFile().

5035  {
5036  include_once("./Services/Export/classes/class.ilExport.php");
5037  $dir = ilExport::_getExportDirectory($this->getId(), "xml", "usr", "personal_data");
5038  if (!is_dir($dir)) {
5039  return "";
5040  }
5041  foreach (ilUtil::getDir($dir) as $entry) {
5042  if (is_int(strpos($entry["entry"], ".zip"))) {
5043  return $entry["entry"];
5044  }
5045  }
5046 
5047  return "";
5048  }
static getDir($a_dir, $a_rec=false, $a_sub_dir="")
get directory
getId()
get object id public
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPersonalPicturePath()

ilObjUser::getPersonalPicturePath (   $a_size = "small",
  $a_force_pic = false 
)

Get path to personal picture.

The result will be cached. The result will be cached.

Parameters
string$a_size"small", "xsmall" or "xxsmall"
bool$a_force_pic
Returns
mixed

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

References _getPersonalPicturePath(), and ilObject\getId().

Referenced by ilForumAuthorInformation\getUserImagePath().

3730  {
3731  if (isset(self::$personal_image_cache[$this->getId()][$a_size][(int) $a_force_pic])) {
3732  return self::$personal_image_cache[$this->getId()][$a_size][(int) $a_force_pic];
3733  }
3734 
3735  self::$personal_image_cache[$this->getId()][$a_size][(int) $a_force_pic] = ilObjUser::_getPersonalPicturePath($this->getId(), $a_size, $a_force_pic);
3736 
3737  return self::$personal_image_cache[$this->getId()][$a_size][(int) $a_force_pic];
3738  }
getId()
get object id public
static _getPersonalPicturePath( $a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false, $html_export=false)
Get path to personal picture.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPhoneHome()

ilObjUser::getPhoneHome ( )

get home phone public

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

References $phone_home.

Referenced by ilSoapUserAdministration\__readUserData(), and deleteUserDefinedFieldEntries().

1836  {
1837  return $this->phone_home;
1838  }
+ Here is the caller graph for this function:

◆ getPhoneMobile()

ilObjUser::getPhoneMobile ( )

get mobile phone public

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

References $phone_mobile.

Referenced by ilSoapUserAdministration\__readUserData(), and deleteUserDefinedFieldEntries().

1855  {
1856  return $this->phone_mobile;
1857  }
+ Here is the caller graph for this function:

◆ getPhoneOffice()

ilObjUser::getPhoneOffice ( )

get office phone public

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

References $phone_office.

Referenced by ilSoapUserAdministration\__readUserData(), and deleteUserDefinedFieldEntries().

1817  {
1818  return $this->phone_office;
1819  }
+ Here is the caller graph for this function:

◆ getPref()

ilObjUser::getPref (   $a_keyword)

get a user preference

Parameters
stringname of parameter public

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

Referenced by ilSoapUserAdministration\__readUserData(), getDateFormat(), ilPublicUserProfileGUI\getPublicPref(), getTimeFormat(), getTimeZone(), hasDeletionFlag(), and hasPublicProfile().

1273  {
1274  if (array_key_exists($a_keyword, $this->prefs)) {
1275  return $this->prefs[$a_keyword];
1276  } else {
1277  return false;
1278  }
1279  }
+ Here is the caller graph for this function:

◆ getProfileIncomplete()

ilObjUser::getProfileIncomplete ( )

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

References ANONYMOUS_USER_ID.

Referenced by assignData().

2395  {
2396  if ($this->id == ANONYMOUS_USER_ID) {
2397  return false;
2398  }
2399  return $this->profile_incomplete;
2400  }
const ANONYMOUS_USER_ID
Definition: constants.php:25
+ Here is the caller graph for this function:

◆ getProfileStatusOfUsers()

static ilObjUser::getProfileStatusOfUsers (   $a_user_ids)
static

Get profile status.

Parameters
array[int]$a_user_ids user ids
Returns
array[] array["global"] => all user ids having their profile global (www) activated, array["local"] => all user ids having their profile only locally (logged in users) activated, array["public"] => all user ids having their profile either locally or globally activated, array["not_public"] => all user ids having their profile deactivated

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

References $DIC, ilObject\$id, and $ilDB.

Referenced by ilInternalLink\searchUsers().

5527  {
5528  global $DIC;
5529 
5530  $ilDB = $DIC->database();
5531 
5532  $set = $ilDB->query(
5533  "SELECT * FROM usr_pref " .
5534  " WHERE keyword = " . $ilDB->quote("public_profile", "text") .
5535  " AND " . $ilDB->in("usr_id", $a_user_ids, false, "integer")
5536  );
5537  $r = array(
5538  "global" => array(),
5539  "local" => array(),
5540  "public" => array(),
5541  "not_public" => array()
5542  );
5543  while ($rec = $ilDB->fetchAssoc($set)) {
5544  if ($rec["value"] == "g") {
5545  $r["global"][] = $rec["usr_id"];
5546  $r["public"][] = $rec["usr_id"];
5547  }
5548  if ($rec["value"] == "y") {
5549  $r["local"][] = $rec["usr_id"];
5550  $r["public"][] = $rec["usr_id"];
5551  }
5552  }
5553  foreach ($a_user_ids as $id) {
5554  if (!in_array($id, $r["public"])) {
5555  $r["not_public"][] = $id;
5556  }
5557  }
5558 
5559  return $r;
5560  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ getPublicName()

ilObjUser::getPublicName ( )

returns firstname lastname and login if profile is public, login otherwise

Returns
string

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

References getFirstname(), getLastname(), getLogin(), and hasPublicProfile().

4563  {
4564  if ($this->hasPublicProfile()) {
4565  return $this->getFirstname() . " " . $this->getLastname() . " (" . $this->getLogin() . ")";
4566  } else {
4567  return $this->getLogin();
4568  }
4569  }
getLogin()
get login / username public
getFirstname()
get firstname public
getLastname()
get lastname public
hasPublicProfile()
returns true if public is profile, false otherwise
+ Here is the call graph for this function:

◆ getSecondEmail()

ilObjUser::getSecondEmail ( )
Returns
null|string

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

References $second_email.

Referenced by ilSoapUserAdministration\__readUserData(), and deleteUserDefinedFieldEntries().

1958  {
1959  return $this->second_email;
1960  }
+ Here is the caller graph for this function:

◆ getSelectedCountry()

ilObjUser::getSelectedCountry ( )

Get selected country (selection drop down)

Returns
string selected country

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

References $sel_country.

Referenced by deleteUserDefinedFieldEntries(), and ilTermsOfServiceUserHasCountryCriterion\evaluate().

1798  {
1799  return $this->sel_country;
1800  }
+ Here is the caller graph for this function:

◆ getStoredActive()

ilObjUser::getStoredActive (   $a_id)

get user active state

Parameters
integer$a_iduser id public
Returns
true if active, otherwise false

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

References $active, and _lookup().

Referenced by assignData(), syncActive(), and ilObjUserTest\testCreateSetLookupDelete().

2312  {
2313  $active = ilObjUser::_lookup($a_id, "active");
2314  return $active ? true : false;
2315  }
static _lookup($a_user_id, $a_field)
Private function for lookup methods.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStreet()

ilObjUser::getStreet ( )

get street public

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

References $street.

Referenced by ilSoapUserAdministration\__readUserData(), ilPersonalProfileGUI\addLocationToForm(), and deleteUserDefinedFieldEntries().

1719  {
1720  return $this->street;
1721  }
+ Here is the caller graph for this function:

◆ getTimeFormat()

ilObjUser::getTimeFormat ( )

get time format

public

Returns

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

References $format, ilCalendarSettings\_getInstance(), and getPref().

1227  {
1228  if ($format = $this->getPref('time_format')) {
1229  return $format;
1230  } else {
1231  include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
1233  return $settings->getDefaultTimeFormat();
1234  }
1235  }
static _getInstance()
get singleton instance
getPref($a_keyword)
get a user preference
$format
Definition: metadata.php:218
+ Here is the call graph for this function:

◆ getTimeLimitFrom()

ilObjUser::getTimeLimitFrom ( )

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

Referenced by ilSoapUserAdministration\__readUserData(), assignData(), checkTimeLimit(), and deleteUserDefinedFieldEntries().

2341  {
2342  return $this->time_limit_from;
2343  }
+ Here is the caller graph for this function:

◆ getTimeLimitMessage()

ilObjUser::getTimeLimitMessage ( )

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

Referenced by ilSoapUserAdministration\__readUserData(), and assignData().

2365  {
2366  return $this->time_limit_message;
2367  }
+ Here is the caller graph for this function:

◆ getTimeLimitOwner()

ilObjUser::getTimeLimitOwner ( )

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

Referenced by ilSoapUserAdministration\__readUserData(), and assignData().

2333  {
2334  return $this->time_limit_owner ? $this->time_limit_owner : 7;
2335  }
+ Here is the caller graph for this function:

◆ getTimeLimitUnlimited()

ilObjUser::getTimeLimitUnlimited ( )

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

Referenced by ilSoapUserAdministration\__readUserData(), assignData(), checkTimeLimit(), and deleteUserDefinedFieldEntries().

2357  {
2358  return $this->time_limit_unlimited;
2359  }
+ Here is the caller graph for this function:

◆ getTimeLimitUntil()

ilObjUser::getTimeLimitUntil ( )

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

Referenced by ilSoapUserAdministration\__readUserData(), assignData(), checkTimeLimit(), deleteUserDefinedFieldEntries(), and ilECSAppEventListener\extendAccount().

2349  {
2350  return $this->time_limit_until;
2351  }
+ Here is the caller graph for this function:

◆ getTimeZone()

ilObjUser::getTimeZone ( )

get timezone of user

public

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

References ilCalendarSettings\_getInstance(), and getPref().

1210  {
1211  if ($tz = $this->getPref('user_tz')) {
1212  return $tz;
1213  } else {
1214  include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
1216  return $settings->getDefaultTimeZone();
1217  }
1218  }
static _getInstance()
get singleton instance
getPref($a_keyword)
get a user preference
+ Here is the call graph for this function:

◆ getUserDefinedData()

ilObjUser::getUserDefinedData ( )

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

Referenced by deleteUserDefinedFieldEntries().

3860  {
3861  return $this->user_defined_data ? $this->user_defined_data : array();
3862  }
+ Here is the caller graph for this function:

◆ getUserIdByLogin()

◆ getUserIdsByEmail()

static ilObjUser::getUserIdsByEmail (   $a_email)
static

STATIC METHOD get all user_ids of an email address.

Parameters
stringemail of user
Returns
array of user ids public

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

References $DIC, $ilDB, $ilias, and $res.

Referenced by ilObjSurvey\sendNotificationMail().

2696  : array
2697  {
2698  global $DIC;
2699 
2700  $ilias = $DIC['ilias'];
2701  $ilDB = $DIC['ilDB'];
2702 
2703  $res = $ilDB->queryF(
2704  "SELECT usr_id FROM usr_data " .
2705  "WHERE email = %s and active = 1",
2706  array("text"),
2707  array($a_email)
2708  );
2709  $ids = array();
2710  while ($row = $ilDB->fetchObject($res)) {
2711  $ids[] = $row->usr_id;
2712  }
2713 
2714  return $ids;
2715  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ getUserIdsByInactivityPeriod()

static ilObjUser::getUserIdsByInactivityPeriod ( int  $periodInDays)
static

Get ids of all users that have been inactive for at least the given period.

Parameters
int$periodInDays
bool$includeNeverLoggedIn
Returns
array
Exceptions

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

References $DIC, $query, and $res.

Referenced by ilCronDeleteInactiveUserAccounts\hasCustomSettings().

4809  : array
4810  {
4811  global $DIC;
4812 
4813  if (!is_numeric($periodInDays) && $periodInDays < 1) {
4814  throw new \ilException('Invalid period given');
4815  }
4816 
4817  $date = date('Y-m-d H:i:s', (time() - ((int) $periodInDays * 24 * 60 * 60)));
4818 
4819  $query = "SELECT usr_id FROM usr_data WHERE last_login IS NOT NULL AND last_login < %s";
4820 
4821  $ids = [];
4822 
4823  $types = ['timestamp'];
4824  $values = [$date];
4825 
4826  $res = $DIC->database()->queryF($query, $types, $values);
4827  while ($row = $DIC->database()->fetchAssoc($res)) {
4828  $ids[] = $row['usr_id'];
4829  }
4830 
4831  return $ids;
4832  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
$query
+ Here is the caller graph for this function:

◆ getUserIdsNeverLoggedIn()

static ilObjUser::getUserIdsNeverLoggedIn ( int  $thresholdInDays)
static

Get ids of all users that have never logged in.

Parameters
int$thresholdInDays
Returns
array

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

References $DIC, $query, and $res.

Referenced by ilCronDeleteNeverLoggedInUserAccounts\run().

4839  : array
4840  {
4841  global $DIC;
4842 
4843  $date = date('Y-m-d H:i:s', (time() - ((int) $thresholdInDays * 24 * 60 * 60)));
4844 
4845  $query = "SELECT usr_id FROM usr_data WHERE last_login IS NULL AND create_date < %s";
4846 
4847  $ids = [];
4848 
4849  $types = ['timestamp'];
4850  $values = [$date];
4851 
4852  $res = $DIC->database()->queryF($query, $types, $values);
4853  while ($row = $DIC->database()->fetchAssoc($res)) {
4854  $ids[] = $row['usr_id'];
4855  }
4856 
4857  return $ids;
4858  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
$query
+ Here is the caller graph for this function:

◆ getUserLoginsByEmail()

static ilObjUser::getUserLoginsByEmail (   $a_email)
static

get all user login names of an email address

Parameters
stringemail of user
Returns
array with all user login names public

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

References $DIC, $ilDB, and $res.

Referenced by ilPasswordAssistanceGUI\submitUsernameAssistanceForm(), and ilObjUserTest\testAuthAndEmailMethods().

2724  : array
2725  {
2726  global $DIC;
2727 
2728  $ilDB = $DIC->database();
2729 
2730  $res = $ilDB->queryF(
2731  "SELECT login FROM usr_data " .
2732  "WHERE email = %s and active = 1",
2733  array("text"),
2734  array($a_email)
2735  );
2736  $ids = array();
2737  while ($row = $ilDB->fetchObject($res)) {
2738  $ids[] = $row->login;
2739  }
2740 
2741  return $ids;
2742  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ getUsersAgreed()

static ilObjUser::getUsersAgreed (   $a_agreed = true,
  $a_users = null 
)
static

Get users that have or have not agreed to the user agreement.

Parameters
bool$a_agreedtrue, if users that have agreed should be returned $
array$a_usersarray of user ids (subset used as base) or null for all users
Returns
array array of user IDs

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

References $DIC, $ilDB, and $ret.

Referenced by ilAwarenessUserCollector\collectUsers().

5197  {
5198  global $DIC;
5199 
5200  $ilDB = $DIC['ilDB'];
5201 
5202  $date_is = ($a_agreed)
5203  ? "IS NOT NULL"
5204  : "IS NULL";
5205 
5206  $users = (is_array($a_users))
5207  ? " AND " . $ilDB->in("usr_id", $a_users, false, "integer")
5208  : "";
5209 
5210  $set = $ilDB->query("SELECT usr_id FROM usr_data " .
5211  " WHERE agree_date " . $date_is .
5212  $users);
5213  $ret = array();
5214  while ($rec = $ilDB->fetchAssoc($set)) {
5215  $ret[] = $rec["usr_id"];
5216  }
5217  return $ret;
5218  }
global $DIC
Definition: goto.php:24
global $ilDB
$ret
Definition: parser.php:6
+ Here is the caller graph for this function:

◆ getUserSubsetByPreferenceValue()

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

For a given set of user IDs return a subset that has a given user preference set.

Parameters
array$a_user_idsarray of user IDs
string$a_keywordpreference keyword
string$a_valvalue
Returns
array array of user IDs

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

References $DIC, and $ilDB.

Referenced by ilAwarenessUserCollector\collectUsers().

4466  {
4467  global $DIC;
4468 
4469  $ilDB = $DIC['ilDB'];
4470 
4471  $users = array();
4472  $set = $ilDB->query(
4473  "SELECT usr_id FROM usr_pref " .
4474  " WHERE keyword = " . $ilDB->quote($a_keyword, "text") .
4475  " AND " . $ilDB->in("usr_id", $a_user_ids, false, "integer") .
4476  " AND value = " . $ilDB->quote($a_val, "text")
4477  );
4478  while ($rec = $ilDB->fetchAssoc($set)) {
4479  $users[] = $rec["usr_id"];
4480  }
4481  return $users;
4482  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ getUTitle()

ilObjUser::getUTitle ( )

get user title (note: don't mix up this method with getTitle() that is derived from ilObject and gets the user object's title) public

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

References $utitle.

Referenced by ilSoapUserAdministration\__readUserData(), deleteUserDefinedFieldEntries(), and ilCmiXapiUser\getName().

1624  {
1625  return $this->utitle;
1626  }
+ Here is the caller graph for this function:

◆ getZipcode()

ilObjUser::getZipcode ( )

get zipcode public

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

References $zipcode.

Referenced by ilSoapUserAdministration\__readUserData(), and deleteUserDefinedFieldEntries().

1757  {
1758  return $this->zipcode;
1759  }
+ Here is the caller graph for this function:

◆ hasActiveSession()

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

Check for simultaneous login.

Returns
bool

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

References $DIC, and $ilDB.

Referenced by ilAuthFrontend\checkSimultaneousLogins().

2577  {
2578  global $DIC;
2579 
2580  $ilDB = $DIC['ilDB'];
2581 
2582  $set = $ilDB->queryf(
2583  '
2584  SELECT COUNT(*) session_count
2585  FROM usr_session WHERE user_id = %s AND expires > %s AND session_id != %s ',
2586  array('integer', 'integer', 'text'),
2587  array($a_user_id, time(), $a_session_id)
2588  );
2589  $row = $ilDB->fetchAssoc($set);
2590  return (bool) $row['session_count'];
2591  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ hasDeletionFlag()

ilObjUser::hasDeletionFlag ( )

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

References getPref().

5265  {
5266  return (bool) $this->getPref("delete_flag");
5267  }
getPref($a_keyword)
get a user preference
+ Here is the call graph for this function:

◆ hasPublicProfile()

ilObjUser::hasPublicProfile ( )

returns true if public is profile, false otherwise

Returns
boolean

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

References getPref().

Referenced by getPublicName().

4553  {
4554  return in_array($this->getPref("public_profile"), array("y", "g"));
4555  }
getPref($a_keyword)
get a user preference
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasToAcceptTermsOfService()

ilObjUser::hasToAcceptTermsOfService ( )
Returns
bool

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

References ANONYMOUS_USER_ID, ilObject\getId(), ilTermsOfServiceHelper\isEnabled(), login(), and SYSTEM_USER_ID.

Referenced by ilSoapUserAdministration\__readUserData().

5174  {
5175  require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
5176 
5177  if (
5179  null == $this->agree_date &&
5180  'root' != $this->login &&
5181  !in_array($this->getId(), array(ANONYMOUS_USER_ID, SYSTEM_USER_ID))
5182  ) {
5183  return true;
5184  }
5185 
5186  return false;
5187  }
const ANONYMOUS_USER_ID
Definition: constants.php:25
const SYSTEM_USER_ID
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: constants.php:24
login()
Definition: login.php:2
getId()
get object id public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasToAcceptTermsOfServiceInSession()

ilObjUser::hasToAcceptTermsOfServiceInSession (   $status = null)
Parameters
bool | null$status
Returns
void|bool

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

References ilSession\get(), ilTermsOfServiceHelper\isEnabled(), and ilSession\set().

Referenced by ilTermsOfServiceHelper\trackAcceptance().

5226  {
5227  if (null === $status) {
5228  return ilSession::get('has_to_accept_agr_in_session');
5229  }
5230 
5231  require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
5233  ilSession::set('has_to_accept_agr_in_session', (int) $status);
5234  }
5235  }
static get($a_var)
Get a value.
static set($a_var, $a_val)
Set a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ importPersonalData()

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

Import personal data.

Parameters

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

5078  {
5079  include_once("./Services/Export/classes/class.ilImport.php");
5080  $imp = new ilImport();
5081  // bookmarks need to be skipped, importer does not exist anymore
5082  $imp->addSkipImporter("Services/Bookmarks");
5083  if (!$a_profile_data) {
5084  $imp->addSkipEntity("Services/User", "usr_profile");
5085  }
5086  if (!$a_settings) {
5087  $imp->addSkipEntity("Services/User", "usr_setting");
5088  }
5089  if (!$a_notes) {
5090  $imp->addSkipEntity("Services/Notes", "user_notes");
5091  }
5092  if (!$a_calendar) {
5093  $imp->addSkipEntity("Services/Calendar", "calendar");
5094  }
5095  $imp->importEntity(
5096  $a_file["tmp_name"],
5097  $a_file["name"],
5098  "personal_data",
5099  "Services/User"
5100  );
5101  }
Import class.

◆ initInactivationDate()

static ilObjUser::initInactivationDate (   $usrIds)
staticprivate

type $ilDB

Parameters
type$usrIds

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

References $DIC, and $ilDB.

5109  {
5110  global $DIC;
5111 
5112  $ilDB = $DIC['ilDB'];
5113 
5114  $NOW = $ilDB->now();
5115 
5116  $usrId_IN_usrIds = $ilDB->in('usr_id', $usrIds, false, 'integer');
5117 
5118  $queryString = "
5119  UPDATE usr_data
5120  SET inactivation_date = $NOW
5121  WHERE inactivation_date IS NULL
5122  AND $usrId_IN_usrIds
5123  ";
5124 
5125  $ilDB->manipulate($queryString);
5126  }
global $DIC
Definition: goto.php:24
global $ilDB

◆ isAnonymous()

ilObjUser::isAnonymous ( )
Returns
bool

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

References ilObject\getId().

Referenced by ilUsersGalleryGUI\addActionSection(), and ilTermsOfServiceHelper\isIncludedUser().

5241  {
5242  return self::_isAnonymous($this->getId());
5243  }
getId()
get object id public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isCaptchaVerified()

ilObjUser::isCaptchaVerified ( )

Is user captcha verified?

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

References $_SESSION.

4991  {
4992  return (boolean) $_SESSION["user_captcha_verified"];
4993  }
$_SESSION["AccountId"]

◆ isCurrentUserActive()

ilObjUser::isCurrentUserActive ( )

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

References $DIC, $ilDB, $login, and getLoginFromAuth().

2654  {
2655  global $DIC;
2656 
2657  $ilDB = $DIC['ilDB'];
2658 
2660  $set = $ilDB->queryF(
2661  "SELECT active FROM usr_data WHERE login= %s",
2662  array("text"),
2663  array($login)
2664  );
2665  //query has got a result
2666  if ($rec = $ilDB->fetchAssoc($set)) {
2667  if ($rec["active"]) {
2668  return true;
2669  }
2670  }
2671 
2672  return false;
2673  }
$login
all user related data in single vars public
static getLoginFromAuth()
Gets the username from $ilAuth, and converts it into an ILIAS login name.
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the call graph for this function:

◆ isPasswordChangeDemanded()

ilObjUser::isPasswordChangeDemanded ( )
Returns
bool

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

References ilSecuritySettings\_getInstance(), ilAuthUtils\_needsExternalAccountByAuthMode(), ANONYMOUS_USER_ID, getAuthMode(), ilUserPasswordManager\getInstance(), getLastPasswordChangeTS(), getPasswordPolicyResetStatus(), and SYSTEM_USER_ID.

2406  {
2407  if ($this->id == ANONYMOUS_USER_ID) {
2408  return false;
2409  }
2410 
2411  if ($this->id == SYSTEM_USER_ID) {
2412  if (
2413  \ilUserPasswordManager::getInstance()->verifyPassword($this, base64_decode('aG9tZXI=')) &&
2415  ) {
2416  return true;
2417  } else {
2418  return false;
2419  }
2420  }
2421 
2422  $security = ilSecuritySettings::_getInstance();
2423 
2424  $authModeAllowsPasswordChange = !ilAuthUtils::_needsExternalAccountByAuthMode($this->getAuthMode(true));
2425  $passwordResetOnFirstLogin = (
2426  $security->isPasswordChangeOnFirstLoginEnabled() &&
2427  $this->getLastPasswordChangeTS() == 0 && $this->is_self_registered == false
2428  );
2429  $passwordResetOnChangedPolicy = $this->getPasswordPolicyResetStatus();
2430 
2431  return ($authModeAllowsPasswordChange && ($passwordResetOnFirstLogin || $passwordResetOnChangedPolicy));
2432  }
getAuthMode($a_auth_key=false)
get auth mode public
const ANONYMOUS_USER_ID
Definition: constants.php:25
getPasswordPolicyResetStatus()
const SYSTEM_USER_ID
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: constants.php:24
static _needsExternalAccountByAuthMode($a_auth_mode)
Check if chosen auth mode needs an external account entry.
static _getInstance()
Get instance of ilSecuritySettings.
static getInstance()
Single method to reduce footprint (included files, created instances)
+ Here is the call graph for this function:

◆ isPasswordExpired()

ilObjUser::isPasswordExpired ( )

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

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

2435  {
2436  if ($this->id == ANONYMOUS_USER_ID) {
2437  return false;
2438  }
2439 
2440  require_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
2441  $security = ilSecuritySettings::_getInstance();
2442  if ($this->getLastPasswordChangeTS() > 0) {
2443  $max_pass_age = $security->getPasswordMaxAge();
2444  if ($max_pass_age > 0) {
2445  $max_pass_age_ts = ($max_pass_age * 86400);
2446  $pass_change_ts = $this->getLastPasswordChangeTS();
2447  $current_ts = time();
2448 
2449  if (($current_ts - $pass_change_ts) > $max_pass_age_ts) {
2451  return true;
2452  }
2453  }
2454  }
2455  }
2456 
2457  return false;
2458  }
getAuthMode($a_auth_key=false)
get auth mode public
const ANONYMOUS_USER_ID
Definition: constants.php:25
static _needsExternalAccountByAuthMode($a_auth_mode)
Check if chosen auth mode needs an external account entry.
static _getInstance()
Get instance of ilSecuritySettings.
+ Here is the call graph for this function:

◆ isSelfRegistered()

ilObjUser::isSelfRegistered ( )

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

References $is_self_registered.

5278  {
5279  return (bool) $this->is_self_registered;
5280  }

◆ lookupMatriculation()

static ilObjUser::lookupMatriculation (   $a_usr_id)
static

Lookup matriculation.

Returns
string matricualtion
Parameters
int$a_usr_idpublic

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

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

Referenced by ilObjCourseGrouping\_checkGroupingDependencies().

1923  {
1924  global $DIC;
1925 
1926  $ilDB = $DIC['ilDB'];
1927 
1928  $query = "SELECT matriculation FROM usr_data " .
1929  "WHERE usr_id = " . $ilDB->quote($a_usr_id);
1930  $res = $ilDB->query($query);
1931  $row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT);
1932  return $row->matriculation ? $row->matriculation : '';
1933  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the caller graph for this function:

◆ lookupOrgUnitsRepresentation()

static ilObjUser::lookupOrgUnitsRepresentation (   $a_usr_id)
static

lokup org unit representation

Parameters
int$a_usr_id
Returns
string

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

Referenced by ilStudyProgrammeMembersTableGUI\fetchData(), ilUserTableGUI\getItems(), ilStudyProgrammeMailTemplateContext\getSpecificPlaceholders(), and ilMemberExport\write().

3406  {
3407  require_once('./Modules/OrgUnit/classes/PathStorage/class.ilOrgUnitPathStorage.php');
3408  return ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($a_usr_id);
3409  }
+ Here is the caller graph for this function:

◆ read()

ilObjUser::read ( )

loads a record "user" from database private

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

References $data, $DIC, $ilDB, $ilErr, assignData(), IL_PASSWD_CRYPTED, readMultiTextFields(), readPrefs(), readUserDefinedFields(), setLastPasswordChangeTS(), setLoginAttempts(), setPasswordPolicyResetStatus(), ilStyleDefinition\skinExists(), ilStyleDefinition\styleExists(), and ilStyleDefinition\styleExistsForSkinId().

Referenced by __construct(), and assignData().

237  {
238  global $DIC;
239 
240  $ilErr = $DIC['ilErr'];
241  $ilDB = $DIC['ilDB'];
242 
243  // Alex: I have removed the JOIN to rbac_ua, since there seems to be no
244  // use (3.11.0 alpha)
245  /*$q = "SELECT * FROM usr_data ".
246  "LEFT JOIN rbac_ua ON usr_data.usr_id=rbac_ua.usr_id ".
247  "WHERE usr_data.usr_id= ".$ilDB->quote($this->id); */
248  $r = $ilDB->queryF("SELECT * FROM usr_data " .
249  "WHERE usr_id= %s", array("integer"), array($this->id));
250 
251  if ($data = $ilDB->fetchAssoc($r)) {
252  // convert password storage layout used by table usr_data into
253  // storage layout used by class ilObjUser
254  $data["passwd_type"] = IL_PASSWD_CRYPTED;
255 
256  // this assign must not be set via $this->assignData($data)
257  // because this method will be called on profile updates and
258  // would set this values to 0, because they arent posted from form
259  $this->setLastPasswordChangeTS($data['last_password_change']);
260  $this->setLoginAttempts($data['login_attempts']);
261  $this->setPasswordPolicyResetStatus((bool) $data['passwd_policy_reset']);
262 
263 
264  // fill member vars in one shot
265  $this->assignData($data);
266 
267  //get userpreferences from usr_pref table
268  $this->readPrefs();
269 
270  //set language to default if not set
271  if ($this->prefs["language"] == "") {
272  $this->prefs["language"] = $this->oldPrefs["language"];
273  }
274 
275  //check skin-setting
276  include_once("./Services/Style/System/classes/class.ilStyleDefinition.php");
277  if ($this->prefs["skin"] == "" ||
278  !ilStyleDefinition::skinExists($this->prefs["skin"])) {
279  $this->prefs["skin"] = $this->oldPrefs["skin"];
280  }
281 
282  $this->skin = $this->prefs["skin"];
283 
284  //check style-setting (skins could have more than one stylesheet
285  if ($this->prefs["style"] == "" ||
286  (!ilStyleDefinition::skinExists($this->skin) && ilStyleDefinition::styleExistsForSkinId($this->skin, $this->prefs["style"])) ||
287  !ilStyleDefinition::styleExists($this->prefs["style"])) {
288  //load default (css)
289  $this->prefs["style"] = $this->ilias->ini->readVariable("layout", "style");
290  }
291 
292  if (empty($this->prefs["hits_per_page"])) {
293  $this->prefs["hits_per_page"] = 10;
294  }
295  } else {
296  $ilErr->raiseError("<b>Error: There is no dataset with id " .
297  $this->id . "!</b><br />class: " . get_class($this) . "<br />Script: " . __FILE__ .
298  "<br />Line: " . __LINE__, $ilErr->FATAL);
299  }
300 
301  $this->readMultiTextFields();
302  $this->readUserDefinedFields();
303 
304  parent::read();
305  }
$data
Definition: storeScorm.php:23
static styleExists($style_id)
setLoginAttempts($a_login_attempts)
const IL_PASSWD_CRYPTED
assignData($a_data)
loads a record "user" from array public
static styleExistsForSkinId($skin_id, $style_id)
$ilErr
Definition: raiseError.php:18
setPasswordPolicyResetStatus(bool $status)
global $DIC
Definition: goto.php:24
redirection script todo: (a better solution should control the processing via a xml file) ...
static skinExists($skin_id, ilSystemStyleConfig $system_style_config=null)
Check whether a skin exists.
setLastPasswordChangeTS($a_last_password_change_ts)
global $ilDB
readMultiTextFields()
Fetch multi-text values from DB.
readPrefs()
get all user preferences private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readMultiTextFields()

ilObjUser::readMultiTextFields ( )
protected

Fetch multi-text values from DB.

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

References $DIC, $ilDB, ilObject\getId(), setGeneralInterests(), setLookingForHelp(), and setOfferingHelp().

Referenced by read().

5395  {
5396  global $DIC;
5397 
5398  $ilDB = $DIC['ilDB'];
5399 
5400  if (!$this->getId()) {
5401  return;
5402  }
5403 
5404  $set = $ilDB->query("SELECT field_id,value" .
5405  " FROM usr_data_multi" .
5406  " WHERE usr_id = " . $ilDB->quote($this->getId(), "integer") .
5407  " ORDER BY value");
5408  while ($row = $ilDB->fetchAssoc($set)) {
5409  $values[$row["field_id"]][] = $row["value"];
5410  }
5411 
5412  if (isset($values["interests_general"])) {
5413  $this->setGeneralInterests($values["interests_general"]);
5414  } else {
5415  $this->setGeneralInterests();
5416  }
5417  if (isset($values["interests_help_offered"])) {
5418  $this->setOfferingHelp($values["interests_help_offered"]);
5419  } else {
5420  $this->setOfferingHelp();
5421  }
5422  if (isset($values["interests_help_looking"])) {
5423  $this->setLookingForHelp($values["interests_help_looking"]);
5424  } else {
5425  $this->setLookingForHelp();
5426  }
5427  }
setOfferingHelp(array $value=null)
Set help offering.
getId()
get object id public
global $DIC
Definition: goto.php:24
setGeneralInterests(array $value=null)
Set general interests.
setLookingForHelp(array $value=null)
Set help looking for.
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readPrefs()

ilObjUser::readPrefs ( )

get all user preferences private

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

References $DIC, $ilDB, $prefs, and _getPreferences().

Referenced by read().

1302  {
1303  global $DIC;
1304 
1305  $ilDB = $DIC['ilDB'];
1306 
1307  if (is_array($this->prefs)) {
1308  $this->oldPrefs = $this->prefs;
1309  }
1310 
1311  $this->prefs = ilObjUser::_getPreferences($this->id);
1312  }
global $DIC
Definition: goto.php:24
global $ilDB
static _getPreferences($user_id)
get preferences for user
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readUserDefinedFields()

ilObjUser::readUserDefinedFields ( )

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

References $DIC, $ilDB, and ilObject\getId().

Referenced by read().

3909  {
3910  global $DIC;
3911 
3912  $ilDB = $DIC['ilDB'];
3913 
3914  include_once("./Services/User/classes/class.ilUserDefinedData.php");
3915  $udata = new ilUserDefinedData($this->getId());
3916 
3917  /* $query = "SELECT * FROM udf_data ".
3918  "WHERE usr_id = ".$ilDB->quote($this->getId(),'integer');
3919 
3920  $res = $this->db->query($query);
3921  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_ASSOC))
3922  {
3923  $this->user_defined_data = $row;
3924  }*/
3925 
3926  $this->user_defined_data = $udata->getAll();
3927 
3928  return true;
3929  }
Class ilUserDefinedData.
getId()
get object id public
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ refreshLogin()

ilObjUser::refreshLogin ( )

updates the login data of a "user" // TODO set date with now() should be enough public

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

References $DIC, $ilDB, getFirstLogin(), ilObject\getId(), ilUserPasswordManager\getInstance(), getPasswd(), getPasswordEncodingType(), and getPasswordSalt().

882  {
883  global $DIC;
884 
885  $ilDB = $DIC['ilDB'];
886 
887  $ilDB->manipulateF(
888  "UPDATE usr_data SET " .
889  "last_login = " . $ilDB->now() .
890  " WHERE usr_id = %s",
891  array("integer"),
892  array($this->id)
893  );
894 
895  if ($this->getFirstLogin() == "") {
896  $ilDB->manipulateF(
897  "UPDATE usr_data SET " .
898  "first_login = " . $ilDB->now() .
899  " WHERE usr_id = %s",
900  array("integer"),
901  array($this->id)
902  );
903  }
904  }
global $DIC
Definition: goto.php:24
global $ilDB
getFirstLogin()
returns first login date
+ Here is the call graph for this function:

◆ removeDeletionFlag()

ilObjUser::removeDeletionFlag ( )

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

References writePref().

5260  {
5261  $this->writePref("delete_flag", false);
5262  }
writePref($a_keyword, $a_value)
write userpref to user table private
+ Here is the call graph for this function:

◆ removeObjectFromClipboard()

ilObjUser::removeObjectFromClipboard (   $a_item_id,
  $a_type 
)

remove object from 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 3371 of file class.ilObjUser.php.

References $DIC, $ilDB, and ilObject\getId().

3372  {
3373  global $DIC;
3374 
3375  $ilDB = $DIC['ilDB'];
3376 
3377  $q = "DELETE FROM personal_clipboard WHERE " .
3378  "item_id = " . $ilDB->quote($a_item_id, "integer") .
3379  " AND type = " . $ilDB->quote($a_type, "text") . " " .
3380  " AND user_id = " . $ilDB->quote($this->getId(), "integer");
3381  $ilDB->manipulate($q);
3382  }
getId()
get object id public
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the call graph for this function:

◆ removeUserPicture()

ilObjUser::removeUserPicture (   $a_do_update = true)

Remove user picture.

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

References ilUtil\getWebspaceDir(), setPref(), and ilObject\update().

Referenced by delete().

3811  {
3812  $webspace_dir = ilUtil::getWebspaceDir();
3813  $image_dir = $webspace_dir . "/usr_images";
3814  $file = $image_dir . "/usr_" . $this->getID() . "." . "jpg";
3815  $thumb_file = $image_dir . "/usr_" . $this->getID() . "_small.jpg";
3816  $xthumb_file = $image_dir . "/usr_" . $this->getID() . "_xsmall.jpg";
3817  $xxthumb_file = $image_dir . "/usr_" . $this->getID() . "_xxsmall.jpg";
3818  $upload_file = $image_dir . "/upload_" . $this->getID();
3819 
3820  if ($a_do_update) {
3821  // remove user pref file name
3822  $this->setPref("profile_image", "");
3823  $this->update();
3824  }
3825 
3826  if (@is_file($file)) {
3827  unlink($file);
3828  }
3829  if (@is_file($thumb_file)) {
3830  unlink($thumb_file);
3831  }
3832  if (@is_file($xthumb_file)) {
3833  unlink($xthumb_file);
3834  }
3835  if (@is_file($xxthumb_file)) {
3836  unlink($xxthumb_file);
3837  }
3838  if (@is_file($upload_file)) {
3839  unlink($upload_file);
3840  }
3841  }
setPref($a_keyword, $a_value)
set a user preference
update()
update object in db
static getWebspaceDir($mode="filesystem")
get webspace directory
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetInactivationDate()

static ilObjUser::resetInactivationDate (   $usrIds)
staticprivate

type $ilDB

Parameters
type$usrIds

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

References $DIC, and $ilDB.

5134  {
5135  global $DIC;
5136 
5137  $ilDB = $DIC['ilDB'];
5138 
5139  $usrId_IN_usrIds = $ilDB->in('usr_id', $usrIds, false, 'integer');
5140 
5141  $queryString = "
5142  UPDATE usr_data
5143  SET inactivation_date = NULL
5144  WHERE $usrId_IN_usrIds
5145  ";
5146 
5147  $ilDB->manipulate($queryString);
5148  }
global $DIC
Definition: goto.php:24
global $ilDB

◆ resetLastPasswordChange()

ilObjUser::resetLastPasswordChange ( )

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

References $DIC, $ilDB, $query, and ilObject\getId().

2491  {
2492  global $DIC;
2493 
2494  $ilDB = $DIC['ilDB'];
2495 
2496  $query = "UPDATE usr_data SET last_password_change = 0 " .
2497  "WHERE usr_id = %s";
2498  $affected = $ilDB->manipulateF(
2499  $query,
2500  array('integer'),
2501  array($this->getId())
2502  );
2503  if ($affected) {
2504  return true;
2505  } else {
2506  return false;
2507  }
2508  }
getId()
get object id public
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the call graph for this function:

◆ resetOwner()

ilObjUser::resetOwner ( )

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

References $DIC, $ilDB, $query, and ilObject\getId().

Referenced by delete().

4932  {
4933  global $DIC;
4934 
4935  $ilDB = $DIC['ilDB'];
4936 
4937  $query = "UPDATE object_data SET owner = 0 " .
4938  "WHERE owner = " . $ilDB->quote($this->getId(), 'integer');
4939  $ilDB->query($query);
4940 
4941  return true;
4942  }
getId()
get object id public
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ searchUsers()

static ilObjUser::searchUsers (   $a_search_str,
  $active = 1,
  $a_return_ids_only = false,
  $filter_settings = false 
)
static

STATIC METHOD get the user_ids which correspond a search string.

Parameters
stringsearch string
boolean$activeSearch only for active users
boolean$a_return_ids_onlyReturn only an array of user id's instead of id, login, name, active status
mixed$filter_settingsFilter settings of the user administration view public

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

References $_SESSION, $active, $DIC, $ilDB, $ilias, $query, ilObject\$rbacreview, ilObject\$ref_id, $res, and ANONYMOUS_USER_ID.

Referenced by ilObjUserTest\testSearch().

2769  {
2770  global $DIC;
2771 
2772  $ilias = $DIC['ilias'];
2773  $ilDB = $DIC['ilDB'];
2774  $ilLog = $DIC['ilLog'];
2775 
2776 
2777  $query = "SELECT usr_data.usr_id, usr_data.login, usr_data.firstname, usr_data.lastname, usr_data.email, usr_data.active FROM usr_data ";
2778 
2779  $without_anonymous_users = true;
2780 
2781  // determine join filter
2782  $join_filter = " WHERE ";
2783  if ($filter_settings !== false && strlen($filter_settings)) {
2784  switch ($filter_settings) {
2785  case 3:
2786  // show only users without courses
2787  $join_filter = " LEFT JOIN obj_members ON usr_data.usr_id = obj_members.usr_id WHERE obj_members.usr_id IS NULL AND ";
2788  break;
2789  case 5:
2790  // show only users with a certain course membership
2791  $ref_id = $_SESSION["user_filter_data"];
2792  if ($ref_id) {
2793  $join_filter = " LEFT JOIN obj_members ON usr_data.usr_id = obj_members.usr_id WHERE obj_members.obj_id = " .
2794  "(SELECT obj_id FROM object_reference WHERE ref_id = " . $ilDB->quote($ref_id, "integer") . ") AND ";
2795  }
2796  break;
2797  case 6:
2798  global $DIC;
2799 
2800  $rbacreview = $DIC['rbacreview'];
2801  $ref_id = $_SESSION["user_filter_data"];
2802  if ($ref_id) {
2803  $local_roles = $rbacreview->getRolesOfRoleFolder($ref_id, false);
2804  if (is_array($local_roles) && count($local_roles)) {
2805  $join_filter = " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE " .
2806  $ilDB->in("rbac_ua.rol_id", $local_roles, false, $local_roles) . " AND ";
2807  }
2808  }
2809  break;
2810  case 7:
2811  global $DIC;
2812 
2813  $rbacreview = $DIC['rbacreview'];
2814  $rol_id = $_SESSION["user_filter_data"];
2815  if ($rol_id) {
2816  $join_filter = " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE rbac_ua.rol_id = " .
2817  $ilDB->quote($rol_id, "integer") . " AND ";
2818  $without_anonymous_users = false;
2819  }
2820  break;
2821  }
2822  }
2823  // This is a temporary hack to search users by their role
2824  // See Mantis #338. This is a hack due to Mantis #337.
2825  if (strtolower(substr($a_search_str, 0, 5)) == "role:") {
2826  $query = "SELECT DISTINCT usr_data.usr_id,usr_data.login,usr_data.firstname,usr_data.lastname,usr_data.email " .
2827  "FROM object_data,rbac_ua,usr_data " .
2828  "WHERE " . $ilDB->like("object_data.title", "text", "%" . substr($a_search_str, 5) . "%") .
2829  " AND object_data.type = 'role' " .
2830  "AND rbac_ua.rol_id = object_data.obj_id " .
2831  "AND usr_data.usr_id = rbac_ua.usr_id " .
2832  "AND rbac_ua.usr_id != " . $ilDB->quote(ANONYMOUS_USER_ID, "integer");
2833  } else {
2834  $query .= $join_filter .
2835  "(" . $ilDB->like("usr_data.login", "text", "%" . $a_search_str . "%") . " " .
2836  "OR " . $ilDB->like("usr_data.firstname", "text", "%" . $a_search_str . "%") . " " .
2837  "OR " . $ilDB->like("usr_data.lastname", "text", "%" . $a_search_str . "%") . " " .
2838  "OR " . $ilDB->like("usr_data.email", "text", "%" . $a_search_str . "%") . ") ";
2839 
2840  if ($filter_settings !== false && strlen($filter_settings)) {
2841  switch ($filter_settings) {
2842  case 0:
2843  $query .= " AND usr_data.active = " . $ilDB->quote(0, "integer") . " ";
2844  break;
2845  case 1:
2846  $query .= " AND usr_data.active = " . $ilDB->quote(1, "integer") . " ";
2847  break;
2848  case 2:
2849  $query .= " AND usr_data.time_limit_unlimited = " . $ilDB->quote(0, "integer") . " ";
2850  break;
2851  case 4:
2852  $date = strftime("%Y-%m-%d %H:%I:%S", mktime(0, 0, 0, $_SESSION["user_filter_data"]["m"], $_SESSION["user_filter_data"]["d"], $_SESSION["user_filter_data"]["y"]));
2853  $query .= " AND last_login < " . $ilDB->quote($date, "timestamp") . " ";
2854  break;
2855  }
2856  }
2857 
2858  if ($without_anonymous_users) {
2859  $query .= "AND usr_data.usr_id != " . $ilDB->quote(ANONYMOUS_USER_ID, "integer");
2860  }
2861 
2862  if (is_numeric($active) && $active > -1 && $filter_settings === false) {
2863  $query .= " AND active = " . $ilDB->quote($active, "integer") . " ";
2864  }
2865  }
2866  $ilLog->write($query);
2867  $res = $ilDB->query($query);
2868  while ($row = $ilDB->fetchObject($res)) {
2869  $users[] = array(
2870  "usr_id" => $row->usr_id,
2871  "login" => $row->login,
2872  "firstname" => $row->firstname,
2873  "lastname" => $row->lastname,
2874  "email" => $row->email,
2875  "active" => $row->active);
2876  $ids[] = $row->usr_id;
2877  }
2878  if ($a_return_ids_only) {
2879  return $ids ? $ids : array();
2880  } else {
2881  return $users ? $users : array();
2882  }
2883  }
const ANONYMOUS_USER_ID
Definition: constants.php:25
$_SESSION["AccountId"]
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the caller graph for this function:

◆ sendPersonalDataFile()

ilObjUser::sendPersonalDataFile ( )

Send personal data file.

Parameters

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

References ilExport\_getExportDirectory(), ilUtil\deliverFile(), ilObject\getId(), and getPersonalDataExportFile().

5057  {
5058  include_once("./Services/Export/classes/class.ilExport.php");
5059  $file = ilExport::_getExportDirectory($this->getId(), "xml", "usr", "personal_data") .
5060  "/" . $this->getPersonalDataExportFile();
5061  if (is_file($file)) {
5063  }
5064  }
getId()
get object id public
getPersonalDataExportFile()
Get personal data export file.
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
+ Here is the call graph for this function:

◆ setActive()

ilObjUser::setActive (   $a_active,
  $a_owner = 0 
)

set user active state and updates system fields appropriately public

Parameters
string$a_activethe active state of the user account
string$a_ownerthe id of the person who approved the account, defaults to 6 (root)

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

References setApproveDate(), and ilObject\setOwner().

Referenced by shibUser\create(), shibUser\createFields(), and syncActive().

2241  {
2242  $this->setOwner($a_owner);
2243 
2244  if ($a_active) {
2245  $this->active = 1;
2246  $this->setApproveDate(date('Y-m-d H:i:s'));
2247  $this->setOwner($a_owner);
2248  } else {
2249  $this->active = 0;
2250  $this->setApproveDate(null);
2251  }
2252  }
setOwner($a_owner)
set object owner
setApproveDate($a_str)
set date the user account was activated null indicates that the user has not yet been activated publ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAgreeDate()

ilObjUser::setAgreeDate (   $a_str)

set date the user account was accepted by the user nullindicates that the user has not accepted his account public

Returns
void

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

Referenced by ilTermsOfServiceHelper\resetAcceptance().

2230  {
2231  $this->agree_date = $a_str;
2232  }
+ Here is the caller graph for this function:

◆ setApproveDate()

ilObjUser::setApproveDate (   $a_str)

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

Returns
void

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

Referenced by setActive().

2200  {
2201  $this->approve_date = $a_str;
2202  }
+ Here is the caller graph for this function:

◆ setAuthMode()

ilObjUser::setAuthMode (   $a_str)

set auth mode public

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

Referenced by assignData().

3426  {
3427  $this->auth_mode = $a_str;
3428  }
+ Here is the caller graph for this function:

◆ setBirthday()

ilObjUser::setBirthday (   $a_birthday)

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

References IL_CAL_DATE.

Referenced by assignData().

4788  {
4789  if (strlen($a_birthday)) {
4790  $date = new ilDate($a_birthday, IL_CAL_DATE);
4791  $this->birthday = $date->get(IL_CAL_DATE);
4792  } else {
4793  $this->birthday = null;
4794  }
4795  }
Class for single dates.
const IL_CAL_DATE
+ Here is the caller graph for this function:

◆ setCaptchaVerified()

ilObjUser::setCaptchaVerified (   $a_val)

Set captcha verified.

Parameters

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

References $_SESSION.

5001  {
5002  $_SESSION["user_captcha_verified"] = $a_val;
5003  }
$_SESSION["AccountId"]

◆ setCity()

ilObjUser::setCity (   $a_str)

set city public

Parameters
stringcity

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

Referenced by assignData().

1729  {
1730  $this->city = $a_str;
1731  }
+ Here is the caller graph for this function:

◆ setClientIP()

ilObjUser::setClientIP (   $a_str)

set client ip number public

Parameters
stringclient ip

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

Referenced by assignData().

1884  {
1885  $this->client_ip = $a_str;
1886  }
+ Here is the caller graph for this function:

◆ setComment()

ilObjUser::setComment (   $a_str)

set referral comment public

Parameters
stringhobby

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

Referenced by assignData().

2180  {
2181  $this->referral_comment = $a_str;
2182  }
+ Here is the caller graph for this function:

◆ setCountry()

ilObjUser::setCountry (   $a_str)

Set country (free text)

public

Parameters
stringcountry

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

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

1768  {
1769  $this->country = $a_str;
1770  }
+ Here is the caller graph for this function:

◆ setCurrentLanguage()

ilObjUser::setCurrentLanguage (   $a_val)

Set current language.

Parameters
string$a_valcurrent language

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

References $_SESSION.

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

2100  {
2101  $_SESSION['lang'] = $a_val;
2102  }
$_SESSION["AccountId"]
+ Here is the caller graph for this function:

◆ setDepartment()

ilObjUser::setDepartment (   $a_str)

set department public

Parameters
stringdepartment

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

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

1691  {
1692  $this->department = $a_str;
1693  }
+ Here is the caller graph for this function:

◆ setEmail()

ilObjUser::setEmail (   $a_str)

set email public

Parameters
stringemail address

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

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

1941  {
1942  $this->email = $a_str;
1943  }
+ Here is the caller graph for this function:

◆ setExternalAccount()

ilObjUser::setExternalAccount (   $a_str)

set external account

note: 3.7.0 uses this field only for cas and soap authentication.

public

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

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

3452  {
3453  $this->ext_account = $a_str;
3454  }
+ Here is the caller graph for this function:

◆ setFax()

ilObjUser::setFax (   $a_str)

set fax public

Parameters
stringfax

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

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

1865  {
1866  $this->fax = $a_str;
1867  }
+ Here is the caller graph for this function:

◆ setFirstLogin()

ilObjUser::setFirstLogin (   $a_str)

set user's first login

Parameters
stringlogin date

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

Referenced by assignData().

2129  {
2130  $this->first_login = $a_str;
2131  }
+ Here is the caller graph for this function:

◆ setFirstname()

ilObjUser::setFirstname (   $a_str)

set firstname public

Parameters
stringfirstname

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

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

1634  {
1635  $this->firstname = $a_str;
1636  }
+ Here is the caller graph for this function:

◆ setFullname()

ilObjUser::setFullname (   $a_title = "",
  $a_firstname = "",
  $a_lastname = "" 
)

builds a string with title + firstname + lastname method is used to build fullname in member variable $this->fullname.

But you may use the function in static manner. static

Parameters
stringtitle (opt.)
stringfirstname (opt.)
stringlastname (opt.)

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

References $fullname, and $lastname.

Referenced by assignData().

1473  {
1474  $this->fullname = "";
1475 
1476  if ($a_title) {
1477  $fullname = $a_title . " ";
1478  } elseif ($this->utitle) {
1479  $this->fullname = $this->utitle . " ";
1480  }
1481 
1482  if ($a_firstname) {
1483  $fullname .= $a_firstname . " ";
1484  } elseif ($this->firstname) {
1485  $this->fullname .= $this->firstname . " ";
1486  }
1487 
1488  if ($a_lastname) {
1489  return $fullname . $a_lastname;
1490  }
1491 
1492  $this->fullname .= $this->lastname;
1493  }
+ Here is the caller graph for this function:

◆ setGender()

ilObjUser::setGender (   $a_str)

set gender public

Parameters
stringgender

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

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

1592  {
1593  $this->gender = substr($a_str, -1);
1594  }
+ Here is the caller graph for this function:

◆ setGeneralInterests()

ilObjUser::setGeneralInterests ( array  $value = null)

Set general interests.

Parameters
array$value

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

Referenced by readMultiTextFields().

5293  {
5294  $this->interests_general = $value;
5295  }
+ Here is the caller graph for this function:

◆ setHobby()

ilObjUser::setHobby (   $a_str)

set hobby public

Parameters
stringhobby

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

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

1976  {
1977  $this->hobby = $a_str;
1978  }
+ Here is the caller graph for this function:

◆ setInactivationDate()

ilObjUser::setInactivationDate (   $inactivation_date)

setter for inactivation date

Parameters
string$inactivationDate

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

References $inactivation_date.

Referenced by assignData().

5156  {
5157  $this->inactivation_date = $inactivation_date;
5158  }
+ Here is the caller graph for this function:

◆ setInstitution()

ilObjUser::setInstitution (   $a_str)

set institution public

Parameters
stringinstitution

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

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

1672  {
1673  $this->institution = $a_str;
1674  }
+ Here is the caller graph for this function:

◆ setIsSelfRegistered()

ilObjUser::setIsSelfRegistered (   $status)
Parameters
bool$status

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

Referenced by assignData().

5273  {
5274  $this->is_self_registered = (bool) $status;
5275  }
+ Here is the caller graph for this function:

◆ setLanguage()

ilObjUser::setLanguage (   $a_str)

set user language public

Parameters
stringlang_key (i.e. de,en,fr,...)

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

References $_SESSION, and setPref().

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

1995  {
1996  $this->setPref("language", $a_str);
1997  unset($_SESSION['lang']);
1998  }
$_SESSION["AccountId"]
setPref($a_keyword, $a_value)
set a user preference
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLastLogin()

ilObjUser::setLastLogin (   $a_str)

set user's last login public

Parameters
stringlogin date

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

Referenced by assignData().

2110  {
2111  $this->last_login = $a_str;
2112  }
+ Here is the caller graph for this function:

◆ setLastname()

ilObjUser::setLastname (   $a_str)

set lastame public

Parameters
stringlastname

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

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

1653  {
1654  $this->lastname = $a_str;
1655  }
+ Here is the caller graph for this function:

◆ setLastPasswordChangeToNow()

ilObjUser::setLastPasswordChangeToNow ( )

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

References $DIC, $ilDB, $query, getLastPasswordChangeTS(), and setLastPasswordChangeTS().

Referenced by ilPasswordAssistanceGUI\submitAssignPasswordForm().

2469  {
2470  global $DIC;
2471 
2472  $ilDB = $DIC['ilDB'];
2473 
2474  $this->setLastPasswordChangeTS(time());
2475 
2476  $query = "UPDATE usr_data SET last_password_change = %s " .
2477  "WHERE usr_id = %s";
2478  $affected = $ilDB->manipulateF(
2479  $query,
2480  array('integer','integer'),
2481  array($this->getLastPasswordChangeTS(),$this->id)
2482  );
2483  if ($affected) {
2484  return true;
2485  } else {
2486  return false;
2487  }
2488  }
global $DIC
Definition: goto.php:24
$query
setLastPasswordChangeTS($a_last_password_change_ts)
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLastPasswordChangeTS()

ilObjUser::setLastPasswordChangeTS (   $a_last_password_change_ts)

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

Referenced by read(), and setLastPasswordChangeToNow().

2011  {
2012  $this->last_password_change_ts = $a_last_password_change_ts;
2013  }
+ Here is the caller graph for this function:

◆ setLastProfilePrompt()

ilObjUser::setLastProfilePrompt (   $a_str)

set user's last profile prompt

Parameters
stringlast profile prompt timestamp

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

Referenced by assignData().

2147  {
2148  $this->last_profile_prompt = $a_str;
2149  }
+ Here is the caller graph for this function:

◆ setLastUpdate()

ilObjUser::setLastUpdate (   $a_str)

set last update of user data set public

Parameters
stringdate

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

Referenced by assignData().

2166  {
2167  $this->last_update = $a_str;
2168  }
+ Here is the caller graph for this function:

◆ setLatitude()

ilObjUser::setLatitude (   $a_latitude)

Set Latitude.

Parameters
string$a_latitudeLatitude

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

Referenced by assignData().

2516  {
2517  $this->latitude = $a_latitude;
2518  }
+ Here is the caller graph for this function:

◆ setLocationZoom()

ilObjUser::setLocationZoom (   $a_locationzoom)

Set Location Zoom.

Parameters
int$a_locationzoomLocation Zoom

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

Referenced by assignData().

2556  {
2557  $this->loc_zoom = $a_locationzoom;
2558  }
+ Here is the caller graph for this function:

◆ setLogin()

ilObjUser::setLogin (   $a_str)

set login / username public

Parameters
stringusername

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

References login().

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

1540  {
1541  $this->login = $a_str;
1542  }
login()
Definition: login.php:2
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLoginAttempts()

ilObjUser::setLoginAttempts (   $a_login_attempts)

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

Referenced by read().

2370  {
2371  $this->login_attempts = $a_login_attempts;
2372  }
+ Here is the caller graph for this function:

◆ setLongitude()

ilObjUser::setLongitude (   $a_longitude)

Set Longitude.

Parameters
string$a_longitudeLongitude

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

Referenced by assignData().

2536  {
2537  $this->longitude = $a_longitude;
2538  }
+ Here is the caller graph for this function:

◆ setLookingForHelp()

ilObjUser::setLookingForHelp ( array  $value = null)

Set help looking for.

Parameters
array$value

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

Referenced by readMultiTextFields().

5353  {
5354  $this->interests_help_looking = $value;
5355  }
+ Here is the caller graph for this function:

◆ setMatriculation()

ilObjUser::setMatriculation (   $a_str)

set matriculation number public

Parameters
stringmatriculation number

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

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

1903  {
1904  $this->matriculation = $a_str;
1905  }
+ Here is the caller graph for this function:

◆ setOfferingHelp()

ilObjUser::setOfferingHelp ( array  $value = null)

Set help offering.

Parameters
array$value

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

Referenced by readMultiTextFields().

5323  {
5324  $this->interests_help_offered = $value;
5325  }
+ Here is the caller graph for this function:

◆ setPasswd()

ilObjUser::setPasswd (   $a_str,
  $a_type = IL_PASSWD_PLAIN 
)

set password public

Parameters
stringpasswd

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

Referenced by assignData(), shibUser\createFields(), and ilUserPasswordManager\encodePassword().

1559  {
1560  $this->passwd = $a_str;
1561  $this->passwd_type = $a_type;
1562  }
+ Here is the caller graph for this function:

◆ setPasswordEncodingType()

ilObjUser::setPasswordEncodingType (   $password_encryption_type)
Parameters
string$password_encryption_type

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

Referenced by assignData(), and ilUserPasswordManager\encodePassword().

319  {
320  $this->password_encoding_type = $password_encryption_type;
321  }
+ Here is the caller graph for this function:

◆ setPasswordPolicyResetStatus()

ilObjUser::setPasswordPolicyResetStatus ( bool  $status)
Parameters
int$passwd_policy_reset

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

Referenced by read().

2032  {
2033  $this->passwd_policy_reset = $status;
2034  }
+ Here is the caller graph for this function:

◆ setPasswordSalt()

ilObjUser::setPasswordSalt (   $password_salt)
Parameters
string | null$password_salt

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

References $password_salt.

Referenced by assignData(), and ilUserPasswordManager\encodePassword().

335  {
336  $this->password_salt = $password_salt;
337  }
+ Here is the caller graph for this function:

◆ setPhoneHome()

ilObjUser::setPhoneHome (   $a_str)

set home phone public

Parameters
stringhome phone

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

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

1827  {
1828  $this->phone_home = $a_str;
1829  }
+ Here is the caller graph for this function:

◆ setPhoneMobile()

ilObjUser::setPhoneMobile (   $a_str)

set mobile phone public

Parameters
stringmobile phone

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

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

1846  {
1847  $this->phone_mobile = $a_str;
1848  }
+ Here is the caller graph for this function:

◆ setPhoneOffice()

ilObjUser::setPhoneOffice (   $a_str)

set office phone public

Parameters
stringoffice phone

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

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

1808  {
1809  $this->phone_office = $a_str;
1810  }
+ Here is the caller graph for this function:

◆ setPref()

ilObjUser::setPref (   $a_keyword,
  $a_value 
)

set a user preference

Parameters
stringname of parameter
stringvalue public

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

Referenced by removeUserPicture(), setLanguage(), and writePref().

1261  {
1262  if ($a_keyword != "") {
1263  $this->prefs[$a_keyword] = $a_value;
1264  }
1265  }
+ Here is the caller graph for this function:

◆ setProfileIncomplete()

ilObjUser::setProfileIncomplete (   $a_prof_inc)

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

Referenced by assignData().

2391  {
2392  $this->profile_incomplete = (boolean) $a_prof_inc;
2393  }
+ Here is the caller graph for this function:

◆ setSecondEmail()

ilObjUser::setSecondEmail (   $second_email)
Parameters
null | string$second_email

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

References $second_email.

Referenced by assignData().

1966  {
1967  $this->second_email = $second_email;
1968  }
+ Here is the caller graph for this function:

◆ setSelectedCountry()

ilObjUser::setSelectedCountry (   $a_val)

Set selected country (selection drop down)

Parameters
stringselected country

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

Referenced by assignData().

1788  {
1789  $this->sel_country = $a_val;
1790  }
+ Here is the caller graph for this function:

◆ setSkin()

ilObjUser::setSkin (   $a_str)

set user skin (template set) public

Parameters
stringdirectory name of template set

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

2323  {
2324  // TODO: exception handling (dir exists)
2325  $this->skin = $a_str;
2326  }

◆ setStreet()

ilObjUser::setStreet (   $a_str)

set street public

Parameters
stringstreet

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

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

1710  {
1711  $this->street = $a_str;
1712  }
+ Here is the caller graph for this function:

◆ setTimeLimitFrom()

ilObjUser::setTimeLimitFrom (   $a_from)

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

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

2337  {
2338  $this->time_limit_from = $a_from;
2339  }
+ Here is the caller graph for this function:

◆ setTimeLimitMessage()

ilObjUser::setTimeLimitMessage (   $a_time_limit_message)

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

Referenced by assignData().

2361  {
2362  return $this->time_limit_message = $a_time_limit_message;
2363  }
+ Here is the caller graph for this function:

◆ setTimeLimitOwner()

ilObjUser::setTimeLimitOwner (   $a_owner)

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

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

2329  {
2330  $this->time_limit_owner = $a_owner;
2331  }
+ Here is the caller graph for this function:

◆ setTimeLimitUnlimited()

ilObjUser::setTimeLimitUnlimited (   $a_unlimited)

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

Referenced by ilAccountCode\applyAccessLimits(), assignData(), and shibUser\createFields().

2353  {
2354  $this->time_limit_unlimited = $a_unlimited;
2355  }
+ Here is the caller graph for this function:

◆ setTimeLimitUntil()

ilObjUser::setTimeLimitUntil (   $a_until)

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

Referenced by ilAccountCode\applyAccessLimits(), assignData(), shibUser\createFields(), and ilECSAppEventListener\extendAccount().

2345  {
2346  $this->time_limit_until = $a_until;
2347  }
+ Here is the caller graph for this function:

◆ setUserDefinedData()

ilObjUser::setUserDefinedData (   $a_data)

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

References $data.

3845  {
3846  if (!is_array($a_data)) {
3847  return false;
3848  }
3849  foreach ($a_data as $field => $data) {
3850  #$new_data[$field] = ilUtil::stripSlashes($data);
3851  // Assign it directly to avoid update problems of unchangable fields
3852  $this->user_defined_data['f_' . $field] = $data;
3853  }
3854  #$this->user_defined_data = $new_data;
3855 
3856  return true;
3857  }
$data
Definition: storeScorm.php:23

◆ setUTitle()

ilObjUser::setUTitle (   $a_str)

set user title (note: don't mix up this method with setTitle() that is derived from ilObject and sets the user object's title) public

Parameters
stringtitle

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

Referenced by assignData().

1613  {
1614  $this->utitle = $a_str;
1615  }
+ Here is the caller graph for this function:

◆ setZipcode()

ilObjUser::setZipcode (   $a_str)

set zipcode public

Parameters
stringzipcode

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

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

1748  {
1749  $this->zipcode = $a_str;
1750  }
+ Here is the caller graph for this function:

◆ syncActive()

ilObjUser::syncActive ( )

synchronizes current and stored user active values for the owner value to be set correctly, this function should only be called when an admin is approving a user account public

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

References getLoginFromAuth(), getStoredActive(), and setActive().

Referenced by assignData().

2288  {
2289  $storedActive = 0;
2290  if ($this->getStoredActive($this->id)) {
2291  $storedActive = 1;
2292  }
2293 
2294  $currentActive = 0;
2295  if ($this->active) {
2296  $currentActive = 1;
2297  }
2298 
2299  if ((!empty($storedActive) && empty($currentActive)) ||
2300  (empty($storedActive) && !empty($currentActive))) {
2301  $this->setActive($currentActive, self::getUserIdByLogin(ilObjUser::getLoginFromAuth()));
2302  }
2303  }
setActive($a_active, $a_owner=0)
set user active state and updates system fields appropriately public
static getLoginFromAuth()
Gets the username from $ilAuth, and converts it into an ILIAS login name.
getStoredActive($a_id)
get user active state
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toUsernameWithoutDomain()

static ilObjUser::toUsernameWithoutDomain (   $a_login)
static

Static function removes Microsoft domain name from username webdav related.

Parameters
string$a_login
Returns
string

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

2634  {
2635  // Remove all characters including the last slash or the last backslash
2636  // in the username
2637  $pos = strrpos($a_login, '/');
2638  $pos2 = strrpos($a_login, '\\');
2639  if ($pos === false || $pos < $pos2) {
2640  $pos = $pos2;
2641  }
2642  if ($pos !== false) {
2643  $a_login = substr($a_login, $pos + 1);
2644  }
2645  return $a_login;
2646  }

◆ updateLogin()

ilObjUser::updateLogin (   $a_login)

update login name

Parameters
stringnew login
Returns
boolean true on success; otherwise false public
Exceptions
ilUserException

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

References $DIC, Vendor\Package\$e, $ilDB, $ilSetting, _getLastHistoryDataByUserId(), _writeHistory(), ilDatePresentation\formatDate(), ilObject\getId(), getLogin(), IL_CAL_UNIX, and login().

1020  {
1021  global $DIC;
1022 
1023  $ilDB = $DIC['ilDB'];
1024  $ilSetting = $DIC['ilSetting'];
1025 
1026  if (func_num_args() != 1) {
1027  return false;
1028  }
1029 
1030  if (!isset($a_login)) {
1031  return false;
1032  }
1033 
1034  $former_login = self::_lookupLogin($this->getId());
1035 
1036  // Update not necessary
1037  if (0 == strcmp($a_login, $former_login)) {
1038  return false;
1039  }
1040 
1041  try {
1042  $last_history_entry = ilObjUser::_getLastHistoryDataByUserId($this->getId());
1043  } catch (ilUserException $e) {
1044  $last_history_entry = null;
1045  }
1046 
1047  // throw exception if the desired loginame is already in history and it is not allowed to reuse it
1048  if ((int) $ilSetting->get('allow_change_loginname') &&
1049  (int) $ilSetting->get('reuse_of_loginnames') == 0 &&
1050  self::_doesLoginnameExistInHistory($a_login)) {
1051  throw new ilUserException($this->lng->txt('loginname_already_exists'));
1052  } elseif ((int) $ilSetting->get('allow_change_loginname') &&
1053  (int) $ilSetting->get('loginname_change_blocking_time') &&
1054  is_array($last_history_entry) &&
1055  $last_history_entry[1] + (int) $ilSetting->get('loginname_change_blocking_time') > time()) {
1056  include_once 'Services/Calendar/classes/class.ilDate.php';
1057  throw new ilUserException(
1058  sprintf(
1059  $this->lng->txt('changing_loginname_not_possible_info'),
1061  new ilDateTime($last_history_entry[1], IL_CAL_UNIX)
1062  ),
1064  new ilDateTime(($last_history_entry[1] + (int) $ilSetting->get('loginname_change_blocking_time')), IL_CAL_UNIX)
1065  )
1066  )
1067  );
1068  } else {
1069  // log old loginname in history
1070  if ((int) $ilSetting->get('allow_change_loginname') &&
1071  (int) $ilSetting->get('create_history_loginname')) {
1072  ilObjUser::_writeHistory($this->getId(), $former_login);
1073  }
1074 
1075  //update login
1076  $this->login = $a_login;
1077 
1078  $ilDB->manipulateF(
1079  '
1080  UPDATE usr_data
1081  SET login = %s
1082  WHERE usr_id = %s',
1083  array('text', 'integer'),
1084  array($this->getLogin(), $this->getId())
1085  );
1086  }
1087 
1088  return true;
1089  }
Class for user related exception handling in ILIAS.
getLogin()
get login / username public
static _getLastHistoryDataByUserId($a_usr_id)
Returns the last used loginname and the changedate of the passed user_id.
login()
Definition: login.php:2
const IL_CAL_UNIX
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
getId()
get object id public
global $DIC
Definition: goto.php:24
global $ilSetting
Definition: privfeed.php:17
global $ilDB
static _writeHistory($a_usr_id, $a_login)
+ Here is the call graph for this function:

◆ updateMultiTextFields()

ilObjUser::updateMultiTextFields (   $a_create = false)

Write multi-text values to DB.

Parameters
bool$a_create

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

References $DIC, ilObject\$id, $ilDB, deleteMultiTextFields(), getGeneralInterests(), ilObject\getId(), getLookingForHelp(), and getOfferingHelp().

Referenced by assignData().

5435  {
5436  global $DIC;
5437 
5438  $ilDB = $DIC['ilDB'];
5439 
5440  if (!$this->getId()) {
5441  return;
5442  }
5443 
5444  if (!$a_create) {
5445  $this->deleteMultiTextFields();
5446  }
5447 
5448  $map = array(
5449  "interests_general" => $this->getGeneralInterests(),
5450  "interests_help_offered" => $this->getOfferingHelp(),
5451  "interests_help_looking" => $this->getLookingForHelp()
5452  );
5453 
5454  foreach ($map as $id => $values) {
5455  if (is_array($values) && sizeof($values)) {
5456  foreach ($values as $value) {
5457  $value = trim($value);
5458  if ($value) {
5459  $uniq_id = $ilDB->nextId('usr_data_multi');
5460 
5461  $ilDB->manipulate("INSERT usr_data_multi" .
5462  " (id,usr_id,field_id,value) VALUES" .
5463  " (" . $ilDB->quote($uniq_id, "integer") .
5464  "," . $ilDB->quote($this->getId(), "integer") .
5465  "," . $ilDB->quote($id, "text") .
5466  "," . $ilDB->quote($value, "text") .
5467  ")");
5468  }
5469  }
5470  }
5471  }
5472  }
getLookingForHelp()
Get help looking for.
getGeneralInterests()
Get general interests.
getId()
get object id public
global $DIC
Definition: goto.php:24
getOfferingHelp()
Get help offering.
deleteMultiTextFields()
Remove multi-text values from DB.
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateUserDefinedFields()

ilObjUser::updateUserDefinedFields ( )

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

References $DIC, $ilDB, and ilObject\getId().

Referenced by assignData().

3865  {
3866  global $DIC;
3867 
3868  $ilDB = $DIC['ilDB'];
3869 
3870  $fields = '';
3871 
3872  $field_def = array();
3873 
3874  include_once("./Services/User/classes/class.ilUserDefinedData.php");
3875  $udata = new ilUserDefinedData($this->getId());
3876 
3877  foreach ($this->user_defined_data as $field => $value) {
3878  if ($field != 'usr_id') {
3879  // $field_def[$field] = array('text',$value);
3880  $udata->set($field, $value);
3881  }
3882  }
3883  $udata->update();
3884 
3885  /* if(!$field_def)
3886  {
3887  return true;
3888  }
3889 
3890  $query = "SELECT usr_id FROM udf_data WHERE usr_id = ".$ilDB->quote($this->getId(),'integer');
3891  $res = $ilDB->query($query);
3892 
3893 
3894  if($res->numRows())
3895  {
3896  // Update
3897  $ilDB->update('udf_data',$field_def,array('usr_id' => array('integer',$this->getId())));
3898  }
3899  else
3900  {
3901  $field_def['usr_id'] = array('integer',$this->getId());
3902  $ilDB->insert('udf_data',$field_def);
3903  }
3904  */
3905  return true;
3906  }
Class ilUserDefinedData.
getId()
get object id public
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ userExists()

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

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

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

Referenced by ilInfoScreenGUI\addObjectSections(), and ilObjForumAccess\getCachedUserInstance().

4973  {
4974  global $DIC;
4975 
4976  $ilDB = $DIC['ilDB'];
4977 
4978  $query = 'SELECT count(*) num FROM object_data od ' .
4979  'JOIN usr_data ud ON obj_id = usr_id ' .
4980  'WHERE ' . $ilDB->in('obj_id', $a_usr_ids, false, 'integer') . ' ';
4981  $res = $ilDB->query($query);
4982  $num_rows = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)->num;
4983  return $num_rows == count((array) $a_usr_ids);
4984  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the caller graph for this function:

◆ writeAccepted()

ilObjUser::writeAccepted ( )

write accept date of user agreement to db

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

References $DIC, $ilDB, and ilObject\getId().

Referenced by ilTermsOfServiceHelper\trackAcceptance().

674  {
675  global $DIC;
676 
677  $ilDB = $DIC['ilDB'];
678 
679  $ilDB->manipulateF("UPDATE usr_data SET agree_date = " . $ilDB->now() .
680  " WHERE usr_id = %s", array("integer"), array($this->getId()));
681  }
getId()
get object id public
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writePref()

ilObjUser::writePref (   $a_keyword,
  $a_value 
)

write userpref to user table private

Parameters
stringkeyword
stringvalue

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

References setPref().

Referenced by activateDeletionFlag(), and removeDeletionFlag().

1098  {
1099  self::_writePref($this->id, $a_keyword, $a_value);
1100  $this->setPref($a_keyword, $a_value);
1101  }
setPref($a_keyword, $a_value)
set a user preference
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writePrefs()

ilObjUser::writePrefs ( )

write all userprefs private

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

References $DIC, $ilDB, and _deleteAllPref().

Referenced by assignData().

1192  {
1193  global $DIC;
1194 
1195  $ilDB = $DIC['ilDB'];
1196 
1197  ilObjUser::_deleteAllPref($this->id);
1198  foreach ($this->prefs as $keyword => $value) {
1199  self::_writePref($this->id, $keyword, $value);
1200  }
1201  }
global $DIC
Definition: goto.php:24
global $ilDB
static _deleteAllPref($a_user_id)
Deletes a userpref value of the user from the database public.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $active

◆ $agree_date

ilObjUser::$agree_date = null

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

Referenced by getAgreeDate().

◆ $approve_date

ilObjUser::$approve_date = null

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

Referenced by getApproveDate().

◆ $auth_mode

ilObjUser::$auth_mode

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

Referenced by getAuthMode().

◆ $birthday

ilObjUser::$birthday
protected

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

Referenced by getBirthday().

◆ $city

ilObjUser::$city

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

Referenced by getCity().

◆ $client_ip

ilObjUser::$client_ip

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

Referenced by getClientIP().

◆ $country

ilObjUser::$country

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

Referenced by getCountry().

◆ $default_role

ilObjUser::$default_role

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

◆ $department

ilObjUser::$department

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

Referenced by getDepartment().

◆ $email

ilObjUser::$email

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

Referenced by getEmail().

◆ $fax

ilObjUser::$fax

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

Referenced by getFax().

◆ $first_login

ilObjUser::$first_login
protected

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

Referenced by getFirstLogin().

◆ $firstname

ilObjUser::$firstname

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

Referenced by getFirstname().

◆ $fullname

ilObjUser::$fullname

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

Referenced by _lookupFullname(), and setFullname().

◆ $gender

ilObjUser::$gender

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

Referenced by getGender().

◆ $hobby

ilObjUser::$hobby

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

Referenced by getHobby().

◆ $ilias

ilObjUser::$ilias

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

Referenced by __construct(), getUserIdsByEmail(), and searchUsers().

◆ $inactivation_date

ilObjUser::$inactivation_date = null
protected

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

Referenced by getInactivationDate(), and setInactivationDate().

◆ $institution

ilObjUser::$institution

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

Referenced by getInstitution().

◆ $interests_general

ilObjUser::$interests_general
protected

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

Referenced by getGeneralInterests().

◆ $interests_help_looking

ilObjUser::$interests_help_looking
protected

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

Referenced by getLookingForHelp().

◆ $interests_help_offered

ilObjUser::$interests_help_offered
protected

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

Referenced by getOfferingHelp().

◆ $is_desktop_item_cache

ilObjUser::$is_desktop_item_cache
static

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

◆ $is_desktop_item_loaded

ilObjUser::$is_desktop_item_loaded
static

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

◆ $is_self_registered

ilObjUser::$is_self_registered = false
private

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

Referenced by isSelfRegistered().

◆ $last_password_change_ts

ilObjUser::$last_password_change_ts

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

Referenced by getLastPasswordChangeTS().

◆ $last_profile_prompt

ilObjUser::$last_profile_prompt
protected

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

Referenced by getLastProfilePrompt().

◆ $lastname

ilObjUser::$lastname

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

Referenced by getLastname(), and setFullname().

◆ $latitude

ilObjUser::$latitude

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

Referenced by getLatitude().

◆ $loc_zoom

ilObjUser::$loc_zoom

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

Referenced by getLocationZoom().

◆ $login

ilObjUser::$login

all user related data in single vars public

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

Referenced by checkUserId(), shibUser\cleanName(), getLogin(), getLoginByUserId(), getLoginFromAuth(), isCurrentUserActive(), and shibUser\returnNewLoginName().

◆ $login_attempts

ilObjUser::$login_attempts

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

Referenced by _getLoginAttempts(), and getLoginAttempts().

◆ $longitude

ilObjUser::$longitude

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

Referenced by getLongitude().

◆ $matriculation

ilObjUser::$matriculation

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

Referenced by getMatriculation().

◆ $org_units

ilObjUser::$org_units
protected

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

◆ $passwd

ilObjUser::$passwd
protected

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

Referenced by assignData(), and getPasswd().

◆ $passwd_policy_reset

ilObjUser::$passwd_policy_reset = false
protected

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

Referenced by getPasswordPolicyResetStatus().

◆ $passwd_type

ilObjUser::$passwd_type
protected

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

Referenced by getPasswdType().

◆ $password_encoding_type

ilObjUser::$password_encoding_type
protected

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

Referenced by getPasswordEncodingType().

◆ $password_salt

ilObjUser::$password_salt = null
protected

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

Referenced by getPasswordSalt(), and setPasswordSalt().

◆ $personal_image_cache

ilObjUser::$personal_image_cache = array()
staticprotected

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

◆ $phone_home

ilObjUser::$phone_home

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

Referenced by getPhoneHome().

◆ $phone_mobile

ilObjUser::$phone_mobile

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

Referenced by getPhoneMobile().

◆ $phone_office

ilObjUser::$phone_office

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

Referenced by getPhoneOffice().

◆ $prefs

ilObjUser::$prefs

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

Referenced by _getPreferences(), and readPrefs().

◆ $referral_comment

ilObjUser::$referral_comment

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

Referenced by getComment().

◆ $second_email

ilObjUser::$second_email = null
protected

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

Referenced by getSecondEmail(), and setSecondEmail().

◆ $sel_country

ilObjUser::$sel_country

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

Referenced by getSelectedCountry().

◆ $skin

ilObjUser::$skin

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

Referenced by __construct().

◆ $street

ilObjUser::$street

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

Referenced by getStreet().

◆ $user_defined_data

ilObjUser::$user_defined_data = array()

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

Referenced by deleteUserDefinedFieldEntries().

◆ $utitle

ilObjUser::$utitle

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

Referenced by getUTitle().

◆ $zipcode

ilObjUser::$zipcode

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

Referenced by getZipcode().


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