ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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...
 
 setDiskQuota ($a_disk_quota)
 Sets the minimal disk quota imposed by this user account. More...
 
 getDiskQuota ()
 Returns the minimal disk quota imposed by this user account. More...
 
 getPersonalWorkspaceDiskQuota ()
 
 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...
 
 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)
 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 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
redirection script todo: (a better solution should control the processing via a xml file) ...
__construct(Container $dic, ilPlugin $plugin)
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 3600 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().

3601  {
3602  $db = $GLOBALS['DIC']->database();
3603  $settings = $GLOBALS['DIC']->settings();
3604 
3605  // Check directly with auth_mode
3606  $r = $db->queryF(
3607  "SELECT * FROM usr_data WHERE " .
3608  " ext_account = %s AND auth_mode = %s",
3609  array("text", "text"),
3610  array($a_account, $a_auth)
3611  );
3612  if ($usr = $db->fetchAssoc($r)) {
3613  return $usr["login"];
3614  }
3615 
3616  if (!$tryFallback) {
3617  return false;
3618  }
3619 
3620  // For compatibility, check for login (no ext_account entry given)
3621  $res = $db->queryF(
3622  "SELECT login FROM usr_data " .
3623  "WHERE login = %s AND auth_mode = %s AND (ext_account IS NULL OR ext_account = '') ",
3624  array("text", "text"),
3625  array($a_account, $a_auth)
3626  );
3627  if ($usr = $db->fetchAssoc($res)) {
3628  return $usr['login'];
3629  }
3630 
3631  // If auth_default == $a_auth => check for login
3632  if (ilAuthUtils::_getAuthModeName($settings->get('auth_mode')) == $a_auth) {
3633  $res = $db->queryF(
3634  "SELECT login FROM usr_data WHERE " .
3635  " ext_account = %s AND auth_mode = %s",
3636  array("text", "text"),
3637  array($a_account, "default")
3638  );
3639  if ($usr = $db->fetchAssoc($res)) {
3640  return $usr["login"];
3641  }
3642  // Search for login (no ext_account given)
3643  $res = $db->queryF(
3644  "SELECT login FROM usr_data " .
3645  "WHERE login = %s AND (ext_account IS NULL OR ext_account = '') AND auth_mode = %s",
3646  array("text", "text"),
3647  array($a_account, "default")
3648  );
3649  if ($usr = $db->fetchAssoc($res)) {
3650  return $usr["login"];
3651  }
3652  }
3653  return false;
3654  }
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 1139 of file class.ilObjUser.php.

References $DIC, and $ilDB.

Referenced by delete(), and writePrefs().

1140  {
1141  global $DIC;
1142 
1143  $ilDB = $DIC['ilDB'];
1144 
1145  $ilDB->manipulateF(
1146  "DELETE FROM usr_pref WHERE usr_id = %s",
1147  array("integer"),
1148  array($a_user_id)
1149  );
1150  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 958 of file class.ilObjUser.php.

References $DIC, $ilDB, and $res.

Referenced by ilAccountRegistrationGUI\saveForm().

959  {
960  global $DIC;
961 
962  $ilDB = $DIC['ilDB'];
963 
964  $res = $ilDB->queryF(
965  '
966  SELECT * FROM loginname_history
967  WHERE login = %s',
968  array('text'),
969  array($a_login)
970  );
971 
972  return $ilDB->fetchAssoc($res) ? true : false;
973  }
foreach($_POST as $key=> $value) $res
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 4246 of file class.ilObjUser.php.

References $DIC, $ilDB, and $res.

Referenced by ilObjUserTest\testAuthAndEmailMethods().

4247  {
4248  global $DIC;
4249 
4250  $ilDB = $DIC['ilDB'];
4251 
4252  $res = $ilDB->queryF(
4253  "SELECT * FROM usr_data " .
4254  "WHERE ext_account = %s AND auth_mode = %s",
4255  array("text", "text"),
4256  array($a_external_account, $a_auth_mode)
4257  );
4258  return $ilDB->fetchAssoc($res) ? true :false;
4259  }
foreach($_POST as $key=> $value) $res
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 4721 of file class.ilObjUser.php.

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

Referenced by ilRegistrationMimeMailNotification\__construct().

4722  {
4723  global $DIC;
4724 
4725  $ilDB = $DIC['ilDB'];
4726 
4727  do {
4728  $continue = false;
4729 
4730  $hashcode = substr(md5(uniqid(rand(), true)), 0, 16);
4731 
4732  $res = $ilDB->queryf(
4733  '
4734  SELECT COUNT(usr_id) cnt FROM usr_data
4735  WHERE reg_hash = %s',
4736  array('text'),
4737  array($hashcode)
4738  );
4739  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
4740  if ($row->cnt > 0) {
4741  $continue = true;
4742  }
4743  break;
4744  }
4745 
4746  if ($continue) {
4747  continue;
4748  }
4749 
4750  $ilDB->manipulateF(
4751  '
4752  UPDATE usr_data
4753  SET reg_hash = %s
4754  WHERE usr_id = %s',
4755  array('text', 'integer'),
4756  array($hashcode, (int) $a_usr_id)
4757  );
4758 
4759  break;
4760  } while (true);
4761 
4762  return $hashcode;
4763  }
foreach($_POST as $key=> $value) $res
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ _getAllUserAssignedStyles()

static ilObjUser::_getAllUserAssignedStyles ( )
static

skins and styles

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

References $DIC, and $ilDB.

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

3100  {
3101  global $DIC;
3102 
3103  $ilDB = $DIC['ilDB'];
3104 
3105  $q = "SELECT DISTINCT up1.value style, up2.value skin FROM usr_pref up1, usr_pref up2 " .
3106  " WHERE up1.keyword = " . $ilDB->quote("style", "text") .
3107  " AND up2.keyword = " . $ilDB->quote("skin", "text") .
3108  " AND up1.usr_id = up2.usr_id";
3109 
3110  $sty_set = $ilDB->query($q);
3111 
3112  $styles = array();
3113  while ($sty_rec = $ilDB->fetchAssoc($sty_set)) {
3114  $styles[] = $sty_rec["skin"] . ":" . $sty_rec["style"];
3115  }
3116 
3117  return $styles;
3118  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 2975 of file class.ilObjUser.php.

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

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

2976  {
2977  global $DIC;
2978 
2979  $ilDB = $DIC['ilDB'];
2980 
2981  $result_arr = array();
2982  $types = array();
2983  $values = array();
2984 
2985  if ($a_fields !== null and is_array($a_fields)) {
2986  if (count($a_fields) == 0) {
2987  $select = "*";
2988  } else {
2989  if (($usr_id_field = array_search("usr_id", $a_fields)) !== false) {
2990  unset($a_fields[$usr_id_field]);
2991  }
2992 
2993  $select = implode(",", $a_fields) . ",usr_data.usr_id";
2994  // online time
2995  if (in_array('online_time', $a_fields)) {
2996  $select .= ",ut_online.online_time ";
2997  }
2998  }
2999 
3000  $q = "SELECT " . $select . " FROM usr_data ";
3001 
3002  // Add online_time if desired
3003  // Need left join here to show users that never logged in
3004  if (in_array('online_time', $a_fields)) {
3005  $q .= "LEFT JOIN ut_online ON usr_data.usr_id = ut_online.usr_id ";
3006  }
3007 
3008  switch ($active) {
3009  case 0:
3010  case 1:
3011  $q .= "WHERE active = " . $ilDB->quote($active, "integer");
3012  break;
3013  case 2:
3014  $q .= "WHERE time_limit_unlimited= " . $ilDB->quote(0, "integer");;
3015  break;
3016  case 3:
3017  $qtemp = $q . ", rbac_ua, object_data WHERE rbac_ua.rol_id = object_data.obj_id AND " .
3018  $ilDB->like("object_data.title", "text", "%crs%") . " AND usr_data.usr_id = rbac_ua.usr_id";
3019  $r = $ilDB->query($qtemp);
3020  $course_users = array();
3021  while ($row = $ilDB->fetchAssoc($r)) {
3022  array_push($course_users, $row["usr_id"]);
3023  }
3024  if (count($course_users)) {
3025  $q .= " WHERE " . $ilDB->in("usr_data.usr_id", $course_users, true, "integer") . " ";
3026  } else {
3027  return $result_arr;
3028  }
3029  break;
3030  case 4:
3031  $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"]));
3032  $q .= " AND last_login < " . $ilDB->quote($date, "timestamp");
3033  break;
3034  case 5:
3035  $ref_id = $_SESSION["user_filter_data"];
3036  if ($ref_id) {
3037  $q .= " LEFT JOIN obj_members ON usr_data.usr_id = obj_members.usr_id " .
3038  "WHERE obj_members.obj_id = (SELECT obj_id FROM object_reference " .
3039  "WHERE ref_id = " . $ilDB->quote($ref_id, "integer") . ") ";
3040  }
3041  break;
3042  case 6:
3043  global $DIC;
3044 
3045  $rbacreview = $DIC['rbacreview'];
3046  $ref_id = $_SESSION["user_filter_data"];
3047  if ($ref_id) {
3048  $local_roles = $rbacreview->getRolesOfRoleFolder($ref_id, false);
3049  if (is_array($local_roles) && count($local_roles)) {
3050  $q .= " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE " .
3051  $ilDB->in("rbac_ua.rol_id", $local_roles, false, "integer") . " ";
3052  }
3053  }
3054  break;
3055  case 7:
3056  $rol_id = $_SESSION["user_filter_data"];
3057  if ($rol_id) {
3058  $q .= " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE rbac_ua.rol_id = " .
3059  $ilDB->quote($rol_id, "integer");
3060  }
3061  break;
3062  }
3063  $r = $ilDB->query($q);
3064 
3065  while ($row = $ilDB->fetchAssoc($r)) {
3066  $result_arr[] = $row;
3067  }
3068  }
3069 
3070  return $result_arr;
3071  }
$_SESSION["AccountId"]
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ _getAvatar()

static ilObjUser::_getAvatar (   $a_usr_id)
static

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

3771  : Avatar
3772  {
3773  $define = new ilUserAvatarResolver((int) $a_usr_id);
3774 
3775  return $define->getAvatar();
3776  }
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 3511 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().

3512  {
3513  global $DIC;
3514 
3515  $ilDB = $DIC['ilDB'];
3516  $ilSetting = $DIC['ilSetting'];
3517 
3518  include_once('./Services/Authentication/classes/class.ilAuthUtils.php');
3519  $q = "SELECT login,usr_id,ext_account,auth_mode FROM usr_data " .
3520  "WHERE auth_mode = %s";
3521  $types[] = "text";
3522  $values[] = $a_auth_mode;
3523  if ($a_read_auth_default and ilAuthUtils::_getAuthModeName($ilSetting->get('auth_mode', AUTH_LOCAL)) == $a_auth_mode) {
3524  $q .= " OR auth_mode = %s ";
3525  $types[] = "text";
3526  $values[] = 'default';
3527  }
3528 
3529  $res = $ilDB->queryF($q, $types, $values);
3530  while ($row = $ilDB->fetchObject($res)) {
3531  if ($row->auth_mode == 'default') {
3532  $accounts[$row->usr_id] = $row->login;
3533  } else {
3534  $accounts[$row->usr_id] = $row->ext_account;
3535  }
3536  }
3537  return $accounts ? $accounts : array();
3538  }
static _getAuthModeName($a_auth_key)
foreach($_POST as $key=> $value) $res
const AUTH_LOCAL
global $ilSetting
Definition: privfeed.php:17
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 4172 of file class.ilObjUser.php.

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

4173  {
4174  global $DIC;
4175 
4176  $ilDB = $DIC['ilDB'];
4177 
4178  if ($a_user_id > 0) {
4179  return ilObjUser::_lookupPref($a_user_id, "priv_feed_pass");
4180  }
4181  return false;
4182  }
static _lookupPref($a_usr_id, $a_keyword)
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ _getImportedUserId()

static ilObjUser::_getImportedUserId (   $i2_id)
static

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

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

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

3417  {
3418  global $DIC;
3419 
3420  $ilDB = $DIC['ilDB'];
3421 
3422  $query = "SELECT obj_id FROM object_data WHERE import_id = " .
3423  $ilDB->quote($i2_id, "text");
3424 
3425  $res = $ilDB->query($query);
3426  while ($row = $ilDB->fetchObject($res)) {
3427  $id = $row->obj_id;
3428  }
3429  return $id ? $id : 0;
3430  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 987 of file class.ilObjUser.php.

References $DIC, $ilDB, and $res.

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

988  {
989  global $DIC;
990 
991  $ilDB = $DIC['ilDB'];
992 
993  $ilDB->setLimit(1, 0);
994  $res = $ilDB->queryF(
995  '
996  SELECT login, history_date FROM loginname_history
997  WHERE usr_id = %s ORDER BY history_date DESC',
998  array('integer'),
999  array($a_usr_id)
1000  );
1001  $row = $ilDB->fetchAssoc($res);
1002  if (!is_array($row) || !count($row)) {
1003  throw new ilUserException('');
1004  }
1005 
1006  return array(
1007  $row['login'], $row['history_date']
1008  );
1009  }
Class for user related exception handling in ILIAS.
foreach($_POST as $key=> $value) $res
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 3680 of file class.ilObjUser.php.

References $DIC, $ilDB, and $ilSetting.

Referenced by ilObjUserTest\testAuthAndEmailMethods().

3681  {
3682  global $DIC;
3683 
3684  $ilDB = $DIC['ilDB'];
3685  $ilSetting = $DIC['ilSetting'];
3686 
3687  // default set to local (1)?
3688 
3689  $q = "SELECT * FROM usr_data WHERE " .
3690  " email = %s AND (auth_mode = %s ";
3691  $types = array("text", "text");
3692  $values = array($a_email, "local");
3693 
3694  if ($ilSetting->get("auth_mode") == 1) {
3695  $q .= " OR auth_mode = %s";
3696  $types[] = "text";
3697  $values[] = "default";
3698  }
3699 
3700  $q .= ")";
3701 
3702  $users = array();
3703  $usr_set = $ilDB->queryF($q, $types, $values);
3704  while ($usr_rec = $ilDB->fetchAssoc($usr_set)) {
3705  $users[$usr_rec["usr_id"]] = $usr_rec["login"];
3706  }
3707 
3708  return $users;
3709  }
global $ilSetting
Definition: privfeed.php:17
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ _getLoginAttempts()

static ilObjUser::_getLoginAttempts (   $a_usr_id)
static

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

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

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

4527  {
4528  global $DIC;
4529 
4530  $ilDB = $DIC['ilDB'];
4531 
4532  $query = "SELECT login_attempts FROM usr_data WHERE usr_id = %s";
4533  $result = $ilDB->queryF($query, array('integer'), array($a_usr_id));
4534  $record = $ilDB->fetchAssoc($result);
4535  $login_attempts = $record['login_attempts'];
4536 
4537  return $login_attempts;
4538  }
$result
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ _getNumberOfUsersForStyle()

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

skins and styles

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

References $DIC, and $ilDB.

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

3077  {
3078  global $DIC;
3079 
3080  $ilDB = $DIC['ilDB'];
3081 
3082  $q = "SELECT count(*) as cnt FROM usr_pref up1, usr_pref up2 " .
3083  " WHERE up1.keyword= " . $ilDB->quote("style", "text") .
3084  " AND up1.value= " . $ilDB->quote($a_style, "text") .
3085  " AND up2.keyword= " . $ilDB->quote("skin", "text") .
3086  " AND up2.value= " . $ilDB->quote($a_skin, "text") .
3087  " AND up1.usr_id = up2.usr_id ";
3088 
3089  $cnt_set = $ilDB->query($q);
3090 
3091  $cnt_rec = $ilDB->fetchAssoc($cnt_set);
3092 
3093  return $cnt_rec["cnt"];
3094  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ _getNumberOfUsersPerAuthMode()

static ilObjUser::_getNumberOfUsersPerAuthMode ( )
static

get number of users per auth mode

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

References $DIC, and $ilDB.

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

3660  {
3661  global $DIC;
3662 
3663  $ilDB = $DIC['ilDB'];
3664 
3665  $r = $ilDB->query("SELECT count(*) AS cnt, auth_mode FROM usr_data " .
3666  "GROUP BY auth_mode");
3667  $cnt_arr = array();
3668  while ($cnt = $ilDB->fetchAssoc($r)) {
3669  $cnt_arr[$cnt["auth_mode"]] = $cnt["cnt"];
3670  }
3671 
3672  return $cnt_arr;
3673  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 
)
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 3789 of file class.ilObjUser.php.

References ilWACSignedPath\signFile().

Referenced by ilMStShowUserGUI\__construct(), 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(), and ilPersonalProfileGUI\showPublicProfileFields().

3794  {
3795  $define = new ilUserAvatarResolver((int) $a_usr_id);
3796  $define->setForcePicture($a_force_pic);
3797  $define->setSize($a_size);
3798 
3799  return ilWACSignedPath::signFile($define->getLegacyPictureURL());
3800  }
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 4460 of file class.ilObjUser.php.

References $DIC, $ilDB, and $prefs.

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

4461  {
4462  global $DIC;
4463 
4464  $ilDB = $DIC['ilDB'];
4465 
4466  $prefs = array();
4467 
4468  $r = $ilDB->queryF(
4469  "SELECT * FROM usr_pref WHERE usr_id = %s",
4470  array("integer"),
4471  array($user_id)
4472  );
4473 
4474  while ($row = $ilDB->fetchAssoc($r)) {
4475  $prefs[$row["keyword"]] = $row["value"];
4476  }
4477 
4478  return $prefs;
4479  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 4413 of file class.ilObjUser.php.

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

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

4414  {
4415  global $DIC;
4416 
4417  $ilDB = $DIC['ilDB'];
4418 
4419  $ids = array();
4420  if (is_array($a_internalids)) {
4421  foreach ($a_internalids as $internalid) {
4422  if (is_numeric($internalid)) {
4423  $ids[] = $internalid;
4424  } else {
4425  $parsedid = ilUtil::__extractId($internalid, IL_INST_ID);
4426  if (is_numeric($parsedid) && $parsedid > 0) {
4427  $ids[] = $parsedid;
4428  }
4429  }
4430  }
4431  }
4432  if (count($ids) == 0) {
4433  $ids [] = -1;
4434  }
4435 
4436  $query = "SELECT usr_data.*, usr_pref.value AS language
4437  FROM usr_data
4438  LEFT JOIN usr_pref
4439  ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
4440  WHERE " . $ilDB->in("usr_data.usr_id", $ids, false, "integer");
4441  $values[] = "language";
4442  $types[] = "text";
4443 
4444  $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4445 
4446  $data = array();
4447  $result = $ilDB->queryF($query, $types, $values);
4448  while ($row = $ilDB->fetchAssoc($result)) {
4449  $data[] = $row;
4450  }
4451  return $data;
4452  }
$data
Definition: storeScorm.php:23
$result
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
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 4893 of file class.ilObjUser.php.

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

Referenced by ilCronDeleteInactivatedUserAccounts\run().

4894  {
4896  $field = 'inactivation_date';
4898 
4899  if (!(int) $period) {
4900  throw new ilException('no valid period given');
4901  }
4902 
4903  global $DIC;
4904 
4905  $ilDB = $DIC['ilDB'];
4906 
4907  $date = date('Y-m-d H:i:s', (time() - ((int) $period * 24 * 60 * 60)));
4908 
4909  $query = "SELECT usr_id FROM usr_data WHERE $field < %s AND active = %s";
4910 
4911  $res = $ilDB->queryF($query, array('timestamp', 'integer'), array($date, 0));
4912 
4913  $ids = array();
4914  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
4915  $ids[] = $row->usr_id;
4916  }
4917 
4918  return $ids;
4919  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 3378 of file class.ilObjUser.php.

References $a_type, $DIC, and $ilDB.

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

3379  {
3380  global $DIC;
3381 
3382  $ilDB = $DIC['ilDB'];
3383 
3384  $q = "SELECT DISTINCT user_id FROM personal_clipboard WHERE " .
3385  "item_id = " . $ilDB->quote($a_id, "integer") . " AND " .
3386  "type = " . $ilDB->quote($a_type, "text");
3387  $user_set = $ilDB->query($q);
3388  $users = array();
3389  while ($user_rec = $ilDB->fetchAssoc($user_set)) {
3390  $users[] = $user_rec["user_id"];
3391  }
3392 
3393  return $users;
3394  }
$a_type
Definition: workflow.php:92
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 4312 of file class.ilObjUser.php.

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

Referenced by ilSoapUserAdministration\getUsersForContainer().

4313  {
4314  global $DIC;
4315 
4316  $ilDB = $DIC['ilDB'];
4317  $data = array();
4318  $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 ";
4319  $types[] = "text";
4320  $values[] = "language";
4321 
4322  if (is_numeric($active) && $active > -1) {
4323  $query .= " AND usr_data.active = %s";
4324  $values[] = $active;
4325  $types[] = "integer";
4326  }
4327 
4328  if ($ref_id != USER_FOLDER_ID) {
4329  $query .= " AND usr_data.time_limit_owner = %s";
4330  $values[] = $ref_id;
4331  $types[] = "integer";
4332  }
4333 
4334  $query .= " AND usr_data.usr_id != %s ";
4335  $values[] = ANONYMOUS_USER_ID;
4336  $types[] = "integer";
4337 
4338  $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4339 
4340  $result = $ilDB->queryF($query, $types, $values);
4341  $data = array();
4342  while ($row = $ilDB->fetchAssoc($result)) {
4343  array_push($data, $row);
4344  }
4345 
4346  return $data;
4347  }
$data
Definition: storeScorm.php:23
$result
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
const USER_FOLDER_ID
Class ilObjUserFolder.
+ 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 4355 of file class.ilObjUser.php.

References $active, and _getUsersForIds().

Referenced by ilSoapUserAdministration\getUsersForContainer().

4356  {
4357  return ilObjUser::_getUsersForIds($a_mem_ids, $active);
4358  }
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 4366 of file class.ilObjUser.php.

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

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

4367  {
4368  global $DIC;
4369 
4370  $rbacadmin = $DIC['rbacadmin'];
4371  $rbacreview = $DIC['rbacreview'];
4372  $ilDB = $DIC['ilDB'];
4373 
4374  $query = "SELECT usr_data.*, usr_pref.value AS language
4375  FROM usr_data
4376  LEFT JOIN usr_pref ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
4377  WHERE " . $ilDB->in("usr_data.usr_id", $a_mem_ids, false, "integer") . "
4378  AND usr_data.usr_id != %s";
4379  $values[] = "language";
4380  $types[] = "text";
4381  $values[] = ANONYMOUS_USER_ID;
4382  $types[] = "integer";
4383 
4384  if (is_numeric($active) && $active > -1) {
4385  $query .= " AND active = %s";
4386  $values[] = $active;
4387  $types[] = "integer";
4388  }
4389 
4390  if ($timelimitowner != USER_FOLDER_ID && $timelimitowner != -1) {
4391  $query .= " AND usr_data.time_limit_owner = %s";
4392  $values[] = $timelimitowner;
4393  $types[] = "integer";
4394  }
4395 
4396  $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4397 
4398  $result = $ilDB->queryF($query, $types, $values);
4399  while ($row = $ilDB->fetchAssoc($result)) {
4400  $mem_arr[] = $row;
4401  }
4402 
4403  return $mem_arr ? $mem_arr : array();
4404  }
$result
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
const USER_FOLDER_ID
Class ilObjUserFolder.
+ 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 4268 of file class.ilObjUser.php.

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

Referenced by ilSoapUserAdministration\getUserForRole().

4269  {
4270  global $DIC;
4271 
4272  $ilDB = $DIC['ilDB'];
4273  $rbacreview = $DIC['rbacreview'];
4274  $data = array();
4275 
4276  $ids = $rbacreview->assignedUsers($role_id);
4277 
4278  if (count($ids) == 0) {
4279  $ids = array(-1);
4280  }
4281 
4282  $query = "SELECT usr_data.*, usr_pref.value AS language
4283  FROM usr_data
4284  LEFT JOIN usr_pref ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
4285  WHERE " . $ilDB->in("usr_data.usr_id", $ids, false, "integer");
4286  $values[] = "language";
4287  $types[] = "text";
4288 
4289 
4290  if (is_numeric($active) && $active > -1) {
4291  $query .= " AND usr_data.active = %s";
4292  $values[] = $active;
4293  $types[] = "integer";
4294  }
4295 
4296  $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4297 
4298  $r = $ilDB->queryF($query, $types, $values);
4299  $data = array();
4300  while ($row = $ilDB->fetchAssoc($r)) {
4301  $data[] = $row;
4302  }
4303  return $data;
4304  }
$data
Definition: storeScorm.php:23
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ _incrementLoginAttempts()

static ilObjUser::_incrementLoginAttempts (   $a_usr_id)
static

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

References $DIC, $ilDB, and $query.

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

4541  {
4542  global $DIC;
4543 
4544  $ilDB = $DIC['ilDB'];
4545 
4546  $query = "UPDATE usr_data SET login_attempts = (login_attempts + 1) WHERE usr_id = %s";
4547  $affected = $ilDB->manipulateF($query, array('integer'), array($a_usr_id));
4548 
4549  if ($affected) {
4550  return true;
4551  } else {
4552  return false;
4553  }
4554  }
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ _isAnonymous()

static ilObjUser::_isAnonymous (   $usr_id)
static
Parameters
int$usr_id
Returns
bool

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

Referenced by ilContactUserActionProvider\collectActionsForTargetUser(), ilPublicUserProfileGUI\getEmbeddable(), ilBuddyList\getInstanceByUserId(), ilBuddyList\request(), ilInitialisation\resumeUserSession(), and ilBuddySystemGUI\transitionAsyncCommand().

5303  {
5304  return $usr_id == ANONYMOUS_USER_ID;
5305  }
+ Here is the caller graph for this function:

◆ _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 4211 of file class.ilObjUser.php.

References $DIC, and $ilDB.

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

4212  {
4213  global $DIC;
4214 
4215  $ilDB = $DIC['ilDB'];
4216 
4217  $q = "SELECT DISTINCT login, usr_id FROM usr_data " .
4218  "WHERE login = %s";
4219  $types[] = "text";
4220  $values[] = $a_login;
4221 
4222  if ($a_user_id != 0) {
4223  $q .= " AND usr_id != %s ";
4224  $types[] = "integer";
4225  $values[] = $a_user_id;
4226  }
4227 
4228  $r = $ilDB->queryF($q, $types, $values);
4229 
4230  if ($row = $ilDB->fetchAssoc($r)) {
4231  return $row['usr_id'];
4232  }
4233  return false;
4234  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 685 of file class.ilObjUser.php.

References $DIC, $ilDB, and $res.

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

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

◆ _lookupActive()

static ilObjUser::_lookupActive (   $a_usr_id)
static

Check user account active.

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

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

Referenced by ilLearningSequenceParticipantsTableGUI\fillRow(), ilGroupParticipantsTableGUI\fillRow(), ilCourseParticipantsTableGUI\fillRow(), ILIAS\Contact\Provider\ContactNotificationProvider\getNotifications(), and ilBuddySystemRelationsTableGUI\populate().

2304  {
2305  global $DIC;
2306 
2307  $ilDB = $DIC['ilDB'];
2308 
2309  $query = 'SELECT usr_id FROM usr_data ' .
2310  'WHERE active = ' . $ilDB->quote(1, 'integer') . ' ' .
2311  'AND usr_id = ' . $ilDB->quote($a_usr_id, 'integer');
2312  $res = $ilDB->query($query);
2313  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
2314  return true;
2315  }
2316  return false;
2317  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 3589 of file class.ilObjUser.php.

References _lookup().

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

3590  {
3591  return (string) ilObjUser::_lookup($a_usr_id, "auth_mode");
3592  }
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 764 of file class.ilObjUser.php.

References _lookup().

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

765  {
766  return ilObjUser::_lookup($a_user_id, "client_ip");
767  }
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 735 of file class.ilObjUser.php.

References _lookup().

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

736  {
737  return ilObjUser::_lookup($a_user_id, "email");
738  }
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 823 of file class.ilObjUser.php.

References _lookup().

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

824  {
825  return ilObjUser::_lookup($a_user_id, "ext_account");
826  }
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 4136 of file class.ilObjUser.php.

References $DIC, and $ilDB.

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

4137  {
4138  global $DIC;
4139 
4140  $ilDB = $DIC['ilDB'];
4141 
4142  if ($a_user_id > 0) {
4143  $set = $ilDB->queryF(
4144  "SELECT feed_hash from usr_data WHERE usr_id = %s",
4145  array("integer"),
4146  array($a_user_id)
4147  );
4148  if ($rec = $ilDB->fetchAssoc($set)) {
4149  if (strlen($rec["feed_hash"]) == 32) {
4150  return $rec["feed_hash"];
4151  } elseif ($a_create) {
4152  $hash = md5(rand(1, 9999999) + str_replace(" ", "", (string) microtime()));
4153  $ilDB->manipulateF(
4154  "UPDATE usr_data SET feed_hash = %s" .
4155  " WHERE usr_id = %s",
4156  array("text", "integer"),
4157  array($hash, $a_user_id)
4158  );
4159  return $hash;
4160  }
4161  }
4162  }
4163 
4164  return false;
4165  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 797 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().

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

◆ _lookupFirstLogin()

static ilObjUser::_lookupFirstLogin (   $a_user_id)
static

lookup first login

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

References _lookup().

Referenced by ilFirstLoginLearningHistoryProvider\getEntries().

870  {
871  return ilObjUser::_lookup($a_user_id, "first_login");
872  }
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 706 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(), ilExAssignmentTeam\createTeam(), ilObjDataCollection\doUpdate(), ilRbacLogTableGUI\fillRow(), ilTestManScoringParticipantsBySelectedQuestionAndPassTableGUI\fillRow(), ilConsultationHourUtils\getConsultationHourLinksForRepositoryObject(), ilObjStudyProgramme\getCreatableSubObjects(), ilLPTableBaseGUI\getExportMeta(), ilCalendarAppointmentPanelGUI\getHTML(), ilCalendarBlockGUI\getHTML(), ilExAssignmentTeamLogTableGUI\getItems(), ilLearningModuleNotification\getMailBody(), ilConsultationHourAppointments\getManager(), ilStudyProgrammeUserAssignment\getSPAssignment(), ilObjSurvey\getSurveyParticipants(), ilExAssignmentTeam\getTeamId(), ilStudyProgrammeUserProgress\informUserForRiskToFail(), 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\sendInvalidateMail(), ilWikiUtil\sendNotification(), ilNote\sendNotifications(), ilObjSurvey\sendTutorNotification(), and ilObjSurvey\sendTutorResults().

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

◆ _lookupGender()

static ilObjUser::_lookupGender (   $a_user_id)
static

Lookup gender.

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

References _lookup().

Referenced by ilObjStudyProgramme\getCreatableSubObjects(), ilMail\getSalutation(), ilStudyProgrammeUserAssignment\getSPAssignment(), ilStudyProgrammeUserProgress\informUserForRiskToFail(), ilObjStudyProgramme\sendInvalidateMail(), and ilObjUserTest\testCreateSetLookupDelete().

754  {
755  return ilObjUser::_lookup($a_user_id, "gender");
756  }
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 831 of file class.ilObjUser.php.

References $DIC, $ilDB, and $res.

Referenced by ilDiskQuotaSummaryNotification\__construct(), ilMail\__construct(), ilObjUserGUI\_goto(), 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(), ilServicesAuthenticationExtractor\extractAfterLogin(), 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(), ilDiskQuotaSummaryNotification\send(), ilNote\sendNotifications(), ilRegistrationSettings\setApproveRecipientLogins(), ilOpenIdConnectUserSync\setInternalAccount(), ilAccessibilitySupportContacts\setList(), ilSystemSupportContacts\setList(), ilObjDiskQuotaSettings\setSummaryRecipients(), ilObjUserTest\testCreateSetLookupDelete(), ilAuthProviderLDAP\updateAccount(), ilLDAPAttributeToUser\usersToXML(), ilRegistrationSettings\validate(), and ilUserImportParser\verifyEndTag().

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

◆ _lookupLanguage()

static ilObjUser::_lookupLanguage (   $a_usr_id)
static

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

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

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

2072  {
2073  global $DIC;
2074 
2075  $ilDB = $DIC->database();
2076  $lng = $DIC->language();
2077 
2078  $q = "SELECT value FROM usr_pref WHERE usr_id= " .
2079  $ilDB->quote($a_usr_id, "integer") . " AND keyword = " .
2080  $ilDB->quote('language', "text");
2081  $r = $ilDB->query($q);
2082 
2083  while ($row = $ilDB->fetchAssoc($r)) {
2084  return $row['value'];
2085  }
2086  if (is_object($lng)) {
2087  return $lng->getDefaultLanguage();
2088  }
2089  return 'en';
2090  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ _lookupLastLogin()

static ilObjUser::_lookupLastLogin (   $a_user_id)
static

lookup last login

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

References _lookup().

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

862  {
863  return ilObjUser::_lookup($a_user_id, "last_login");
864  }
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 815 of file class.ilObjUser.php.

References _lookup().

Referenced by ilMailSummaryNotification\__construct(), ilCourseXMLParser\__parseId(), ilRegistrationSettings\__read(), ilObjSurvey\checkReminder(), ilExAssignmentReminder\checkReminders(), ilWorkspaceUserActionProvider\collectActionsForTargetUser(), ilChatUserActionProvider\collectActionsForTargetUser(), ilOrgUnitUserAssignmentGUI\confirmRecursive(), ilMailEventNotificationSender\createMailValueObjectsWithAttachments(), ilMailEventNotificationSender\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(), ilObjStudyProgramme\getCreatableSubObjects(), ilAttendanceList\getHTML(), ilWebDAVUtil\getLogin(), getLoginByUserId(), getLoginFromAuth(), ilConsultationHourAppointments\getManagedUsers(), ilConsultationHourAppointments\getManager(), ilNoteGUI\getNoteListHTML(), ilStudyProgrammeMailMemberSearchGUI\getProcessData(), ilTestServiceGUI\getResultsHeadUserAndPass(), ilStudyProgrammeUserAssignment\getSPAssignment(), ilStudyProgrammeMailTemplateContext\getSpecificPlaceholders(), ilObjSurvey\getUserDataFromActiveId(), ilForumSettingsGUI\getUserNotificationTableData(), ilInternalLinkGUI\getUserSearchResult(), ilUserClipboard\getValidatedContent(), ilObjUserGUI\getValues(), ilAuthFrontend\handleAuthenticationSuccess(), ilStudyProgrammeUserProgress\informUserForRiskToFail(), ilCalendarAppointmentGUI\initForm(), ilMailSearchGroupsGUI\mailMembers(), ilMailSearchCoursesGUI\mailMembers(), ilContactGUI\mailToUsers(), ilPermission2GUI\owner(), ilUserClipboardTableGUI\parse(), ilCalendarSharedUserListTableGUI\parse(), ilTrashTableGUI\parse(), ilLearningSequenceRoles\readMemberData(), ilObjGroupGUI\readMemberData(), ilObjCourseGUI\readMemberData(), ilCalendarEntry\readResponsibleUsers(), ilExerciseManagementGUI\redirectFeedbackMailObject(), ilBuddyList\request(), ilLearningModuleNotification\send(), ilObjSurvey\send360ReminderToUser(), ilObjSurvey\sendAppraiseeCloseNotification(), ilObjSurvey\sendAppraiseeNotification(), ilTimingsCronReminder\sendExceededMail(), ilTimingsCronReminder\sendFreshlyStartedMail(), 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(), ilObjSurvey\sendTutorNotification(), ilObjSurvey\sendTutorResults(), ilMailSearchCoursesGUI\showMembers(), ilMailSearchGUI\showResults(), ilMailFolderGUI\showUser(), ilContactGUI\submitInvitation(), ilObjUserTest\testCreateSetLookupDelete(), ilBuddySystemGUI\transitionAsyncCommand(), ilBuddySystemGUI\transitionCommand(), ilUserImportParser\verifyEndTag(), and ilPCParagraph\xml2output().

816  {
817  return ilObjUser::_lookup($a_user_id, "login");
818  }
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 775 of file class.ilObjUser.php.

References $DIC, $ilDB, and $res.

Referenced by ilFileVersionTableGUI\__construct(), 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(), ilStudyProgrammeAutoMembershipsTableGUI\fillRow(), ilStudyProgrammeAutoCategoriesTableGUI\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(), 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(), ilTestEvaluationGUI\outParticipantsResultsOverview(), ilCourseReferenceDeleteConfirmationTableGUI\parse(), ilUserClipboardTableGUI\parse(), ilCalendarSharedUserListTableGUI\parse(), ilCalendarSharedListTableGUI\parse(), ilConsultationHoursTableGUI\parse(), ilGroupParticipantsTableGUI\parse(), ilCourseParticipantsTableGUI\parse(), ilObjPortfolioGUI\printView(), ilLearningSequenceRoles\readMemberData(), ilObjGroupGUI\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().

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

◆ _lookupPref()

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

Definition at line 1280 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().

1281  {
1282  global $DIC;
1283 
1284  $ilDB = $DIC['ilDB'];
1285 
1286  $query = "SELECT * FROM usr_pref WHERE usr_id = " . $ilDB->quote($a_usr_id, "integer") . " " .
1287  "AND keyword = " . $ilDB->quote($a_keyword, "text");
1288  $res = $ilDB->query($query);
1289 
1290  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1291  return $row->value;
1292  }
1293  return false;
1294  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 745 of file class.ilObjUser.php.

References _lookup().

746  {
747  return ilObjUser::_lookup($a_user_id, "second_email");
748  }
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 3123 of file class.ilObjUser.php.

References $DIC, and $ilDB.

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

3124  {
3125  global $DIC;
3126 
3127  $ilDB = $DIC['ilDB'];
3128 
3129  $q = "SELECT up1.usr_id usr_id FROM usr_pref up1, usr_pref up2 " .
3130  " WHERE up1.keyword= " . $ilDB->quote("style", "text") .
3131  " AND up1.value= " . $ilDB->quote($a_from_style, "text") .
3132  " AND up2.keyword= " . $ilDB->quote("skin", "text") .
3133  " AND up2.value= " . $ilDB->quote($a_from_skin, "text") .
3134  " AND up1.usr_id = up2.usr_id ";
3135 
3136  $usr_set = $ilDB->query($q);
3137 
3138  while ($usr_rec = $ilDB->fetchAssoc($usr_set)) {
3139  self::_writePref($usr_rec["usr_id"], "skin", $a_to_skin);
3140  self::_writePref($usr_rec["usr_id"], "style", $a_to_style);
3141  }
3142  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 2954 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().

2955  {
2956  global $DIC;
2957 
2958  $ilDB = $DIC['ilDB'];
2959  $res = $ilDB->query("SELECT * FROM usr_data WHERE " .
2960  $ilDB->in("usr_id", $a_user_ids, false, "integer"));
2961  while ($row = $ilDB->fetchAssoc($res)) {
2962  $user_data["$row[usr_id]"] = $row;
2963  }
2964  return $user_data ? $user_data : array();
2965  }
foreach($_POST as $key=> $value) $res
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ _resetLoginAttempts()

static ilObjUser::_resetLoginAttempts (   $a_usr_id)
static

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

References $DIC, $ilDB, and $query.

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

4511  {
4512  global $DIC;
4513 
4514  $ilDB = $DIC['ilDB'];
4515 
4516  $query = "UPDATE usr_data SET login_attempts = 0 WHERE usr_id = %s";
4517  $affected = $ilDB->manipulateF($query, array('integer'), array($a_usr_id));
4518 
4519  if ($affected) {
4520  return true;
4521  } else {
4522  return false;
4523  }
4524  }
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 4189 of file class.ilObjUser.php.

References $DIC, and $ilDB.

4190  {
4191  global $DIC;
4192 
4193  $ilDB = $DIC['ilDB'];
4194 
4195  self::_writePref(
4196  $a_user_id,
4197  "priv_feed_pass",
4198  ($a_password == "") ? "" : md5($a_password)
4199  );
4200  }
global $ilDB
$DIC
Definition: xapitoken.php:46

◆ _setUserInactive()

static ilObjUser::_setUserInactive (   $a_usr_id)
static

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

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

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

4557  {
4558  global $DIC;
4559 
4560  $ilDB = $DIC['ilDB'];
4561 
4562  $query = "UPDATE usr_data SET active = 0, inactivation_date = %s WHERE usr_id = %s";
4563  $affected = $ilDB->manipulateF($query, array('timestamp', 'integer'), array(ilUtil::now(), $a_usr_id));
4564 
4565  if ($affected) {
4566  return true;
4567  } else {
4568  return false;
4569  }
4570  }
static now()
Return current timestamp in Y-m-d H:i:s format.
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 3547 of file class.ilObjUser.php.

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

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

3548  {
3549  global $DIC;
3550 
3551  $ilDB = $DIC['ilDB'];
3552 
3553  if (!is_array($a_usr_ids)) {
3554  return false;
3555  }
3556 
3557 
3558  if ($a_status) {
3559  $q = "UPDATE usr_data SET active = 1, inactivation_date = NULL WHERE " .
3560  $ilDB->in("usr_id", $a_usr_ids, false, "integer");
3561  $ilDB->manipulate($q);
3562  } else {
3563  $usrId_IN_usrIds = $ilDB->in("usr_id", $a_usr_ids, false, "integer");
3564 
3565  $q = "UPDATE usr_data SET active = 0 WHERE $usrId_IN_usrIds";
3566  $ilDB->manipulate($q);
3567 
3568  $queryString = "
3569  UPDATE usr_data
3570  SET inactivation_date = %s
3571  WHERE inactivation_date IS NULL
3572  AND $usrId_IN_usrIds
3573  ";
3574  $ilDB->manipulateF($queryString, array('timestamp'), array(ilUtil::now()));
3575  }
3576 
3577  return true;
3578  }
static now()
Return current timestamp in Y-m-d H:i:s format.
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 4930 of file class.ilObjUser.php.

References $DIC, $ilDB, and $query.

4931  {
4932  if ($a_last_login !== null) {
4933  $last_login = $a_last_login;
4934  } else {
4935  $last_login = date('Y-m-d H:i:s');
4936  }
4937 
4938  global $DIC;
4939 
4940  $ilDB = $DIC['ilDB'];
4941 
4942  $query = "UPDATE usr_data SET last_login = %s WHERE usr_id = %s";
4943  $affected = $ilDB->manipulateF($query, array('timestamp', 'integer'), array($last_login, $a_usr_id));
4944 
4945  $query = "UPDATE usr_data SET first_login = %s WHERE usr_id = %s AND first_login IS NULL";
4946  $ilDB->manipulateF($query, array('timestamp', 'integer'), array($last_login, $a_usr_id));
4947 
4948 
4949  if ($affected) {
4950  return $last_login;
4951  } else {
4952  return false;
4953  }
4954  }
$query
global $ilDB
$DIC
Definition: xapitoken.php:46

◆ _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 3719 of file class.ilObjUser.php.

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

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

3720  {
3721  $webspace_dir = ilUtil::getWebspaceDir();
3722  $image_dir = $webspace_dir . "/usr_images";
3723  $store_file = "usr_" . $obj_id . "." . "jpg";
3724  $target_file = $image_dir . "/$store_file";
3725 
3726  chmod($tmp_file, 0770);
3727 
3728  // take quality 100 to avoid jpeg artefacts when uploading jpeg files
3729  // taking only frame [0] to avoid problems with animated gifs
3730  $show_file = "$image_dir/usr_" . $obj_id . ".jpg";
3731  $thumb_file = "$image_dir/usr_" . $obj_id . "_small.jpg";
3732  $xthumb_file = "$image_dir/usr_" . $obj_id . "_xsmall.jpg";
3733  $xxthumb_file = "$image_dir/usr_" . $obj_id . "_xxsmall.jpg";
3734 
3735  ilUtil::execConvert($tmp_file . "[0] -geometry 200x200 -quality 100 JPEG:" . $show_file);
3736  ilUtil::execConvert($tmp_file . "[0] -geometry 100x100 -quality 100 JPEG:" . $thumb_file);
3737  ilUtil::execConvert($tmp_file . "[0] -geometry 75x75 -quality 100 JPEG:" . $xthumb_file);
3738  ilUtil::execConvert($tmp_file . "[0] -geometry 30x30 -quality 100 JPEG:" . $xxthumb_file);
3739 
3740  // store filename
3741  self::_writePref($obj_id, "profile_image", $store_file);
3742 
3743  return true;
3744  }
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 4773 of file class.ilObjUser.php.

References $DIC, $ilDB, and $res.

Referenced by ilStartUpGUI\_checkGoto().

4774  {
4775  global $DIC;
4776 
4777  $ilDB = $DIC['ilDB'];
4778 
4779  $res = $ilDB->queryf(
4780  '
4781  SELECT usr_id, create_date FROM usr_data
4782  WHERE reg_hash = %s',
4783  array('text'),
4784  array($a_hash)
4785  );
4786  while ($row = $ilDB->fetchAssoc($res)) {
4787  require_once 'Services/Registration/classes/class.ilRegistrationSettings.php';
4788  $oRegSettigs = new ilRegistrationSettings();
4789 
4790  if ((int) $oRegSettigs->getRegistrationHashLifetime() != 0 &&
4791  time() - (int) $oRegSettigs->getRegistrationHashLifetime() > strtotime($row['create_date'])) {
4792  require_once 'Services/Registration/exceptions/class.ilRegConfirmationLinkExpiredException.php';
4793  throw new ilRegConfirmationLinkExpiredException('reg_confirmation_hash_life_time_expired', $row['usr_id']);
4794  }
4795 
4796  $ilDB->manipulateF(
4797  '
4798  UPDATE usr_data
4799  SET reg_hash = %s
4800  WHERE usr_id = %s',
4801  array('text', 'integer'),
4802  array('', (int) $row['usr_id'])
4803  );
4804 
4805  return (int) $row['usr_id'];
4806  }
4807 
4808  require_once 'Services/Registration/exceptions/class.ilRegistrationHashNotFoundException.php';
4809  throw new ilRegistrationHashNotFoundException('reg_confirmation_hash_not_found');
4810  }
Class for user related exception handling in ILIAS.
foreach($_POST as $key=> $value) $res
Class ilObjAuthSettingsGUI.
global $ilDB
$DIC
Definition: xapitoken.php:46
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 2106 of file class.ilObjUser.php.

References $DIC, and $ilDB.

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

2107  {
2108  global $DIC;
2109 
2110  $ilDB = $DIC['ilDB'];
2111 
2112  $ilDB->manipulateF(
2113  "UPDATE usr_data " .
2114  " SET auth_mode = %s WHERE usr_id = %s",
2115  array("text", "integer"),
2116  array($a_auth_mode, $a_usr_id)
2117  );
2118  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ _writeExternalAccount()

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

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

References $DIC, and $ilDB.

Referenced by ilObjUserTest\testAuthAndEmailMethods().

2093  {
2094  global $DIC;
2095 
2096  $ilDB = $DIC['ilDB'];
2097 
2098  $ilDB->manipulateF(
2099  "UPDATE usr_data " .
2100  " SET ext_account = %s WHERE usr_id = %s",
2101  array("text", "integer"),
2102  array($a_ext_id, $a_usr_id)
2103  );
2104  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ _writeHistory()

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

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

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

Referenced by updateLogin().

4597  {
4598  global $DIC;
4599 
4600  $ilDB = $DIC['ilDB'];
4601 
4602  $timestamp = time();
4603 
4604  $res = $ilDB->queryF(
4605  'SELECT * FROM loginname_history WHERE usr_id = %s AND login = %s AND history_date = %s',
4606  array('integer', 'text', 'integer'),
4607  array($a_usr_id, $a_login, $timestamp)
4608  );
4609 
4610  if ($ilDB->numRows($res) == 0) {
4611  $ilDB->manipulateF(
4612  '
4613  INSERT INTO loginname_history
4614  (usr_id, login, history_date)
4615  VALUES (%s, %s, %s)',
4616  array('integer', 'text', 'integer'),
4617  array($a_usr_id, $a_login, $timestamp)
4618  );
4619  }
4620 
4621  return true;
4622  }
foreach($_POST as $key=> $value) $res
foreach($mandatory_scripts as $file) $timestamp
Definition: buildRTE.php:81
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 1158 of file class.ilObjUser.php.

References $DIC, and $ilDB.

Referenced by ilBadgeProfileGUI\saveSettings().

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

◆ activateDeletionFlag()

ilObjUser::activateDeletionFlag ( )

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

References writePref().

5308  {
5309  $this->writePref("delete_flag", true);
5310  }
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 3158 of file class.ilObjUser.php.

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

3165  {
3166  global $DIC;
3167 
3168  $ilDB = $DIC['ilDB'];
3169 
3170  if ($a_time == 0) {
3171  $a_time = date("Y-m-d H:i:s", time());
3172  }
3173 
3174  $item_set = $ilDB->queryF(
3175  "SELECT * FROM personal_clipboard WHERE " .
3176  "parent = %s AND item_id = %s AND type = %s AND user_id = %s",
3177  array("integer", "integer", "text", "integer"),
3178  array(0, $a_item_id, $a_type, $this->getId())
3179  );
3180 
3181  // only insert if item is not already in clipboard
3182  if (!$d = $item_set->fetchRow()) {
3183  $ilDB->manipulateF(
3184  "INSERT INTO personal_clipboard " .
3185  "(item_id, type, user_id, title, parent, insert_time, order_nr) VALUES " .
3186  " (%s,%s,%s,%s,%s,%s,%s)",
3187  array("integer", "text", "integer", "text", "integer", "timestamp", "integer"),
3188  array($a_item_id, $a_type, $this->getId(), $a_title, (int) $a_parent, $a_time, (int) $a_order_nr)
3189  );
3190  } else {
3191  $ilDB->manipulateF(
3192  "UPDATE personal_clipboard SET insert_time = %s " .
3193  "WHERE user_id = %s AND item_id = %s AND type = %s AND parent = 0",
3194  array("timestamp", "integer", "integer", "text"),
3195  array($a_time, $this->getId(), $a_item_id, $a_type)
3196  );
3197  }
3198  }
$a_type
Definition: workflow.php:92
getId()
get object id public
global $ilDB
$DIC
Definition: xapitoken.php:46
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 3203 of file class.ilObjUser.php.

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

3204  {
3205  global $DIC;
3206 
3207  $ilDB = $DIC['ilDB'];
3208  if ($a_time == 0) {
3209  $a_time = date("Y-m-d H:i:s", time());
3210  }
3211  $ilDB->insert("personal_pc_clipboard", array(
3212  "user_id" => array("integer", $this->getId()),
3213  "content" => array("clob", $a_content),
3214  "insert_time" => array("timestamp", $a_time),
3215  "order_nr" => array("integer", $a_nr)
3216  ));
3217  }
getId()
get object id public
$a_content
Definition: workflow.php:93
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ addUserDefinedFieldEntry()

ilObjUser::addUserDefinedFieldEntry ( )

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

References $DIC, and $ilDB.

Referenced by assignData().

3957  {
3958  global $DIC;
3959 
3960  $ilDB = $DIC['ilDB'];
3961 
3962  // not needed. no entry in udf_text/udf_clob means no value
3963 
3964  /* $query = "INSERT INTO udf_data (usr_id ) ".
3965  "VALUES( ".
3966  $ilDB->quote($this->getId(),'integer').
3967  ")";
3968  $res = $ilDB->manipulate($query);
3969  */
3970  return true;
3971  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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
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
$DIC
Definition: xapitoken.php:46
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 5436 of file class.ilObjUser.php.

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

5437  {
5438  $current = $this->$a_attr;
5439  if (is_array($current) && sizeof($current)) {
5440  return implode(", ", $current);
5441  }
5442  }
+ Here is the caller graph for this function:

◆ checkTimeLimit()

ilObjUser::checkTimeLimit ( )

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

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

Referenced by ilAuthFrontend\checkTimeLimit().

2418  {
2419  if ($this->getTimeLimitUnlimited()) {
2420  return true;
2421  }
2422  if ($this->getTimeLimitFrom() < time() and $this->getTimeLimitUntil() > time()) {
2423  return true;
2424  }
2425  return false;
2426  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkUserId()

ilObjUser::checkUserId ( )

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

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

2635  {
2636  global $DIC;
2637 
2638  $ilSetting = $DIC['ilSetting'];
2639 
2642  if ($id > 0) {
2643  return $id;
2644  }
2645  return false;
2646  }
$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 $ilSetting
Definition: privfeed.php:17
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ clipboardDeleteAll()

ilObjUser::clipboardDeleteAll ( )

Delete objects of type for user.

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

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

Referenced by delete().

3289  {
3290  global $DIC;
3291 
3292  $ilDB = $DIC['ilDB'];
3293 
3294  $ilDB->manipulateF("DELETE FROM personal_clipboard WHERE " .
3295  "user_id = %s", array("integer"), array($this->getId()));
3296  }
getId()
get object id public
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 3271 of file class.ilObjUser.php.

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

3272  {
3273  global $DIC;
3274 
3275  $ilDB = $DIC['ilDB'];
3276 
3277  $ilDB->manipulateF(
3278  "DELETE FROM personal_clipboard WHERE " .
3279  "type = %s AND user_id = %s",
3280  array("text", "integer"),
3281  array($a_type, $this->getId())
3282  );
3283  }
$a_type
Definition: workflow.php:92
getId()
get object id public
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 3249 of file class.ilObjUser.php.

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

3250  {
3251  global $DIC;
3252 
3253  $ilDB = $DIC['ilDB'];
3254 
3255  $set = $ilDB->queryF(
3256  "SELECT * FROM personal_clipboard WHERE " .
3257  "parent = %s AND type = %s AND user_id = %s",
3258  array("integer", "text", "integer"),
3259  array(0, $a_type, $this->getId())
3260  );
3261  if ($rec = $ilDB->fetchAssoc($set)) {
3262  return true;
3263  }
3264 
3265  return false;
3266  }
$a_type
Definition: workflow.php:92
getId()
get object id public
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 3808 of file class.ilObjUser.php.

References ilUtil\getWebspaceDir().

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

3809  {
3810  $a_dir = trim(str_replace("..", "", $a_dir));
3811  if ($a_dir == "" || !is_dir($a_dir)) {
3812  return;
3813  }
3814 
3815  $webspace_dir = ilUtil::getWebspaceDir();
3816  $image_dir = $webspace_dir . "/usr_images";
3817  $images = array(
3818  "upload_" . $a_user_id . "pic",
3819  "usr_" . $a_user_id . "." . "jpg",
3820  "usr_" . $a_user_id . "_small.jpg",
3821  "usr_" . $a_user_id . "_xsmall.jpg",
3822  "usr_" . $a_user_id . "_xxsmall.jpg",
3823  "upload_" . $a_user_id);
3824  foreach ($images as $image) {
3825  if (is_file($image_dir . "/" . $image)) {
3826  copy($image_dir . "/" . $image, $a_dir . "/" . $image);
3827  }
3828  }
3829  }
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 1318 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(), ilDiskQuotaHandler\deleteByOwner(), ilBadgeAssignment\deleteByUserId(), deleteMultiTextFields(), deleteUserDefinedFieldEntries(), ilObjPortfolio\deleteUserPortfolios(), ilObject\getId(), ilOrgUnitUserAssignmentQueries\getInstance(), getLogin(), ilNotification\removeForUser(), ilCronDeleteInactiveUserReminderMail\removeSingleUserFromTable(), removeUserPicture(), and resetOwner().

1319  {
1320  global $DIC;
1321 
1322  $rbacadmin = $DIC->rbac()->admin();
1323  $ilDB = $DIC['ilDB'];
1324 
1325  // deassign from ldap groups
1326  include_once('Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
1328  $mapping->deleteUser($this->getId());
1329 
1330  // remove mailbox / update sent mails
1331  include_once("Services/Mail/classes/class.ilMailbox.php");
1332  $mailbox = new ilMailbox($this->getId());
1333  $mailbox->delete();
1334  $mailbox->updateMailsOfDeletedUser($this->getLogin());
1335 
1336  // delete feed blocks on personal desktop
1337  include_once("./Services/Block/classes/class.ilCustomBlock.php");
1338  $costum_block = new ilCustomBlock();
1339  $costum_block->setContextObjId($this->getId());
1340  $costum_block->setContextObjType("user");
1341  $c_blocks = $costum_block->queryBlocksForContext();
1342  include_once("./Services/Feeds/classes/class.ilPDExternalFeedBlock.php");
1343  foreach ($c_blocks as $c_block) {
1344  if ($c_block["type"] == "pdfeed") {
1345  $fb = new ilPDExternalFeedBlock($c_block["id"]);
1346  $fb->delete();
1347  }
1348  }
1349 
1350 
1351  // delete block settings
1352  include_once("./Services/Block/classes/class.ilBlockSetting.php");
1354 
1355  // delete user_account
1356  $ilDB->manipulateF(
1357  "DELETE FROM usr_data WHERE usr_id = %s",
1358  array("integer"),
1359  array($this->getId())
1360  );
1361 
1362  $this->deleteMultiTextFields();
1363 
1364  // delete user_prefs
1365  ilObjUser::_deleteAllPref($this->getId());
1366 
1367  $this->removeUserPicture(false); // #8597
1368 
1369  // delete user_session
1370  include_once("./Services/Authentication/classes/class.ilSession.php");
1372 
1373  // remove user from rbac
1374  $rbacadmin->removeUser($this->getId());
1375 
1376  // remove bookmarks
1377  // TODO: move this to class.ilBookmarkFolder
1378  $q = "DELETE FROM bookmark_tree WHERE tree = " .
1379  $ilDB->quote($this->getId(), "integer");
1380  $ilDB->manipulate($q);
1381 
1382  $q = "DELETE FROM bookmark_data WHERE user_id = " .
1383  $ilDB->quote($this->getId(), "integer");
1384  $ilDB->manipulate($q);
1385 
1386  // DELETE FORUM ENTRIES (not complete in the moment)
1387  include_once './Modules/Forum/classes/class.ilObjForum.php';
1388  ilObjForum::_deleteUser($this->getId());
1389 
1390  // Delete link check notify entries
1391  include_once './Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
1393 
1394  // Delete crs entries
1395  include_once './Modules/Course/classes/class.ilObjCourse.php';
1396  ilObjCourse::_deleteUser($this->getId());
1397 
1398  // Delete user tracking
1399  include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
1401 
1402  include_once 'Modules/Session/classes/class.ilEventParticipants.php';
1404 
1405  // Delete Tracking data SCORM 2004 RTE
1406  include_once 'Modules/Scorm2004/classes/ilSCORM13Package.php';
1408 
1409  // Delete Tracking data SCORM 1.2 RTE
1410  include_once 'Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php';
1412 
1413  // remove all notifications
1414  include_once "./Services/Notification/classes/class.ilNotification.php";
1416 
1417  // remove portfolios
1418  include_once "./Modules/Portfolio/classes/class.ilObjPortfolio.php";
1420 
1421  // remove workspace
1422  include_once "./Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
1423  $tree = new ilWorkspaceTree($this->getId());
1424  $tree->cascadingDelete();
1425 
1426  // remove disk quota entries
1427  include_once "./Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
1429 
1430  // remove reminder entries
1431  require_once 'Services/User/classes/class.ilCronDeleteInactiveUserReminderMail.php';
1433 
1434  // badges
1435  include_once "Services/Badge/classes/class.ilBadgeAssignment.php";
1437 
1438  // remove org unit assignments
1439  $ilOrgUnitUserAssignmentQueries = ilOrgUnitUserAssignmentQueries::getInstance();
1440  $ilOrgUnitUserAssignmentQueries->deleteAllAssignmentsOfUser($this->getId());
1441 
1442  // Delete user defined field entries
1444 
1445  // Delete clipboard entries
1446  $this->clipboardDeleteAll();
1447 
1448  // Reset owner
1449  $this->resetOwner();
1450 
1451  // Trigger deleteUser Event
1452  global $DIC;
1453 
1454  $ilAppEventHandler = $DIC['ilAppEventHandler'];
1455  $ilAppEventHandler->raise(
1456  'Services/User',
1457  'deleteUser',
1458  array('usr_id' => $this->getId())
1459  );
1460 
1461  // delete object data
1462  parent::delete();
1463  return true;
1464  }
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.
static deleteByOwner($a_owner_id)
Delete all entries for owner.
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.
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
$DIC
Definition: xapitoken.php:46
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 5530 of file class.ilObjUser.php.

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

Referenced by delete(), and updateMultiTextFields().

5531  {
5532  global $DIC;
5533 
5534  $ilDB = $DIC['ilDB'];
5535 
5536  if (!$this->getId()) {
5537  return;
5538  }
5539 
5540  $ilDB->manipulate("DELETE FROM usr_data_multi" .
5541  " WHERE usr_id = " . $ilDB->quote($this->getId(), "integer"));
5542  }
getId()
get object id public
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 1108 of file class.ilObjUser.php.

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

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

◆ deleteUserDefinedFieldEntries()

ilObjUser::deleteUserDefinedFieldEntries ( )

Definition at line 3973 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().

3974  {
3975  global $DIC;
3976 
3977  $ilDB = $DIC['ilDB'];
3978 
3979  include_once("./Services/User/classes/class.ilUserDefinedData.php");
3981 
3982  // wrong place...
3983  /* $query = "DELETE FROM udf_data ".
3984  "WHERE usr_id = ".$ilDB->quote($this->getId(),'integer');
3985  $res = $ilDB->manipulate($query);*/
3986 
3987  return true;
3988  }
getId()
get object id public
static deleteEntriesOfUser($a_user_id)
Delete data of user.
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 5036 of file class.ilObjUser.php.

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

5037  {
5038  include_once("./Services/Export/classes/class.ilExport.php");
5039  $exp = new ilExport();
5040  $dir = ilExport::_getExportDirectory($this->getId(), "xml", "usr", "personal_data");
5041  ilUtil::delDir($dir, true);
5042  $title = $this->getLastname() . ", " . $this->getLastname() . " [" . $this->getLogin() . "]";
5043  $exp->exportEntity(
5044  "personal_data",
5045  $this->getId(),
5046  "",
5047  "Services/User",
5048  $title,
5049  $dir
5050  );
5051  }
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 5544 of file class.ilObjUser.php.

References $DIC, $ilDB, and $res.

Referenced by ilPublicUserProfileGUI\getAutocompleteResult().

5545  {
5546  global $DIC;
5547 
5548  $ilDB = $DIC['ilDB'];
5549 
5550  $res = array();
5551 
5552  $sql = "SELECT DISTINCT(value)" .
5553  " FROM usr_data_multi" .
5554  " WHERE " . $ilDB->like("value", "text", "%" . $a_term . "%");
5555  if ($a_field_id) {
5556  $sql .= " AND field_id = " . $ilDB->quote($a_field_id, "text");
5557  }
5558  if ($a_user_id) {
5559  $sql .= " AND usr_id <> " . $ilDB->quote($a_user_id, "integer");
5560  }
5561  $sql .= " ORDER BY value";
5562  $set = $ilDB->query($sql);
5563  while ($row = $ilDB->fetchAssoc($set)) {
5564  $res[] = $row["value"];
5565  }
5566 
5567  return $res;
5568  }
foreach($_POST as $key=> $value) $res
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ getActive()

ilObjUser::getActive ( )

get user active state public

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

References $active.

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

2296  {
2297  return $this->active;
2298  }
+ 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 2255 of file class.ilObjUser.php.

References $agree_date.

2256  {
2257  return $this->agree_date;
2258  }

◆ getApproveDate()

ilObjUser::getApproveDate ( )

get the date when the user account was approved public

Returns
string approve date

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

References $approve_date.

Referenced by ilSoapUserAdministration\__readUserData().

2245  {
2246  return $this->approve_date;
2247  }
+ Here is the caller graph for this function:

◆ getAuthMode()

ilObjUser::getAuthMode (   $a_auth_key = false)

get auth mode public

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

References $auth_mode, and ilAuthUtils\_getAuthMode().

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

3467  {
3468  if (!$a_auth_key) {
3469  return $this->auth_mode;
3470  }
3471 
3472  include_once('./Services/Authentication/classes/class.ilAuthUtils.php');
3473  return ilAuthUtils::_getAuthMode($this->auth_mode);
3474  }
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 3766 of file class.ilObjUser.php.

References ilObject\getId().

3766  : Avatar
3767  {
3768  return self::_getAvatar($this->getId());
3769  }
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 4822 of file class.ilObjUser.php.

References $birthday.

Referenced by assignData().

4823  {
4824  return $this->birthday;
4825  }
+ Here is the caller graph for this function:

◆ getCity()

ilObjUser::getCity ( )

get city public

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

References $city.

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

1741  {
1742  return $this->city;
1743  }
+ Here is the caller graph for this function:

◆ getClientIP()

ilObjUser::getClientIP ( )

get client ip number public

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

References $client_ip.

Referenced by ilAuthFrontend\checkIp().

1896  {
1897  return $this->client_ip;
1898  }
+ Here is the caller graph for this function:

◆ getClipboardChilds()

ilObjUser::getClipboardChilds (   $a_parent,
  $a_insert_time 
)

Get childs of an item.

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

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

3346  {
3347  global $DIC;
3348 
3349  $ilDB = $DIC['ilDB'];
3350  $ilUser = $DIC['ilUser'];
3351 
3352  $objs = $ilDB->queryF(
3353  "SELECT * FROM personal_clipboard WHERE " .
3354  "user_id = %s AND parent = %s AND insert_time = %s " .
3355  " ORDER BY order_nr",
3356  array("integer", "integer", "timestamp"),
3357  array($ilUser->getId(), (int) $a_parent, $a_insert_time)
3358  );
3359  $objects = array();
3360  while ($obj = $ilDB->fetchAssoc($objs)) {
3361  if ($obj["type"] == "mob") {
3362  $obj["title"] = ilObject::_lookupTitle($obj["item_id"]);
3363  }
3364  $objects[] = array("id" => $obj["item_id"],
3365  "type" => $obj["type"], "title" => $obj["title"], "insert_time" => $obj["insert_time"]);
3366  }
3367  return $objects;
3368  }
static _lookupTitle($a_id)
lookup object title
$ilUser
Definition: imgupload.php:18
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 3301 of file class.ilObjUser.php.

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

3302  {
3303  global $DIC;
3304 
3305  $ilDB = $DIC['ilDB'];
3306 
3307  $par = "";
3308  if ($a_top_nodes_only) {
3309  $par = " AND parent = " . $ilDB->quote(0, "integer") . " ";
3310  }
3311 
3312  $type_str = ($a_type != "")
3313  ? " AND type = " . $ilDB->quote($a_type, "text") . " "
3314  : "";
3315  $q = "SELECT * FROM personal_clipboard WHERE " .
3316  "user_id = " . $ilDB->quote($this->getId(), "integer") . " " .
3317  $type_str . $par .
3318  " ORDER BY order_nr";
3319  $objs = $ilDB->query($q);
3320  $objects = array();
3321  while ($obj = $ilDB->fetchAssoc($objs)) {
3322  if ($obj["type"] == "mob") {
3323  $obj["title"] = ilObject::_lookupTitle($obj["item_id"]);
3324  if (ilObject::_lookupType((int) $obj["item_id"]) !== "mob") {
3325  continue;
3326  }
3327  }
3328  if ($obj["type"] == "incl") {
3329  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
3330  $obj["title"] = ilMediaPoolPage::lookupTitle($obj["item_id"]);
3331  if (!ilPageObject::_exists("mep", (int) $obj["item_id"], "-")) {
3332  continue;
3333  }
3334  }
3335  $objects[] = array("id" => $obj["item_id"],
3336  "type" => $obj["type"], "title" => $obj["title"],
3337  "insert_time" => $obj["insert_time"]);
3338  }
3339  return $objects;
3340  }
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.
$a_type
Definition: workflow.php:92
getId()
get object id public
static _lookupType($a_id, $a_reference=false)
lookup object type
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ getComment()

ilObjUser::getComment ( )

get referral comment public

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

References $referral_comment.

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

2224  {
2225  return $this->referral_comment;
2226  }
+ Here is the caller graph for this function:

◆ getCountry()

ilObjUser::getCountry ( )

Get country (free text)

public

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

References $country.

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

1781  {
1782  return $this->country;
1783  }
+ 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 2124 of file class.ilObjUser.php.

References $_SESSION.

2125  {
2126  return $_SESSION['lang'];
2127  }
$_SESSION["AccountId"]

◆ getDateFormat()

ilObjUser::getDateFormat ( )

get date format

public

Returns

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

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

1243  {
1244  if ($format = $this->getPref('date_format')) {
1245  return $format;
1246  } else {
1247  include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
1248  $settings = ilCalendarSettings::_getInstance();
1249  return $settings->getDefaultDateFormat();
1250  }
1251  }
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 1702 of file class.ilObjUser.php.

References $department.

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

1703  {
1704  return $this->department;
1705  }
+ Here is the caller graph for this function:

◆ getDiskQuota()

ilObjUser::getDiskQuota ( )

Returns the minimal disk quota imposed by this user account.

The minimal disk quota is specified in bytes. The default value is 0.

public

Returns
integer

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

2036  {
2037  return $this->prefs["disk_quota"] ? $this->prefs["disk_quota"] : 0;
2038  }

◆ getEmail()

ilObjUser::getEmail ( )

◆ getExternalAccount()

ilObjUser::getExternalAccount ( )

get external account

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

public

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

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

3496  {
3497  return $this->ext_account;
3498  }
+ Here is the caller graph for this function:

◆ getFax()

ilObjUser::getFax ( )

get fax public

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

References $fax.

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

1877  {
1878  return $this->fax;
1879  }
+ 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 4976 of file class.ilObjUser.php.

References $DIC, and $ilDB.

Referenced by ilObjUserFolderGUI\viewObject().

4977  {
4978  global $DIC;
4979 
4980  $ilDB = $DIC->database();
4981 
4982  $q = "SELECT DISTINCT " . $ilDB->upper($ilDB->substr("lastname", 1, 1)) . " let" .
4983  " FROM usr_data" .
4984  " WHERE usr_id <> " . $ilDB->quote(ANONYMOUS_USER_ID, "integer") .
4985  ($user_ids !== null ? " AND " . $ilDB->in('usr_id', $user_ids, false, "integer") : "") .
4986  " ORDER BY let";
4987  $let_set = $ilDB->query($q);
4988 
4989  $lets = array();
4990  while ($let_rec = $ilDB->fetchAssoc($let_set)) {
4991  $let[$let_rec["let"]] = $let_rec["let"];
4992  }
4993  return $let;
4994  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ getFirstLogin()

ilObjUser::getFirstLogin ( )

returns first login date

Returns
string date

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

References $first_login.

Referenced by refreshLogin().

2173  {
2174  return $this->first_login;
2175  }
+ Here is the caller graph for this function:

◆ getFirstname()

ilObjUser::getFirstname ( )

get firstname public

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

References $firstname.

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

1646  {
1647  return $this->firstname;
1648  }
+ 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 1512 of file class.ilObjUser.php.

References ilUtil\stripSlashes().

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

1513  {
1514  if (!$a_max_strlen) {
1515  return ilUtil::stripSlashes($this->fullname);
1516  }
1517 
1518  if (strlen($this->fullname) <= $a_max_strlen) {
1519  return ilUtil::stripSlashes($this->fullname);
1520  }
1521 
1522  if ((strlen($this->utitle) + strlen($this->lastname) + 4) <= $a_max_strlen) {
1523  return ilUtil::stripSlashes($this->utitle . " " . substr($this->firstname, 0, 1) . ". " . $this->lastname);
1524  }
1525 
1526  if ((strlen($this->firstname) + strlen($this->lastname) + 1) <= $a_max_strlen) {
1527  return ilUtil::stripSlashes($this->firstname . " " . $this->lastname);
1528  }
1529 
1530  if ((strlen($this->lastname) + 3) <= $a_max_strlen) {
1531  return ilUtil::stripSlashes(substr($this->firstname, 0, 1) . ". " . $this->lastname);
1532  }
1533 
1534  return ilUtil::stripSlashes(substr($this->lastname, 0, $a_max_strlen));
1535  }
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 1603 of file class.ilObjUser.php.

References $gender.

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

1604  {
1605  return $this->gender;
1606  }
+ Here is the caller graph for this function:

◆ getGeneralInterests()

ilObjUser::getGeneralInterests ( )

Get general interests.

Returns
array $value

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

References $interests_general.

Referenced by updateMultiTextFields().

5356  {
5357  return $this->interests_general;
5358  }
+ Here is the caller graph for this function:

◆ getGeneralInterestsAsText()

ilObjUser::getGeneralInterestsAsText ( )

Get general interests as plain text.

Returns
string

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

References buildTextFromArray().

5366  {
5367  return $this->buildTextFromArray("interests_general");
5368  }
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 1987 of file class.ilObjUser.php.

References $hobby.

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

1988  {
1989  return $this->hobby;
1990  }
+ Here is the caller graph for this function:

◆ getInactivationDate()

ilObjUser::getInactivationDate ( )

getter for inactivation date

Returns
string $inactivation_date

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

References $inactivation_date.

5191  {
5192  return $this->inactivation_date;
5193  }

◆ getInstitution()

ilObjUser::getInstitution ( )

get institution public

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

References $institution.

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

1684  {
1685  return $this->institution;
1686  }
+ Here is the caller graph for this function:

◆ getLanguage()

◆ getLastLogin()

ilObjUser::getLastLogin ( )

returns last login date public

Returns
string date

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

Referenced by ilSoapUserAdministration\__readUserData().

2155  {
2156  return $this->last_login;
2157  }
+ Here is the caller graph for this function:

◆ getLastname()

ilObjUser::getLastname ( )

◆ getLastPasswordChangeTS()

ilObjUser::getLastPasswordChangeTS ( )

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

References $last_password_change_ts.

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

2051  {
2053  }
+ 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 2190 of file class.ilObjUser.php.

References $last_profile_prompt.

2191  {
2193  }

◆ getLastUpdate()

ilObjUser::getLastUpdate ( )

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

References ilObject\$last_update.

Referenced by ilSoapUserAdministration\__readUserData().

2205  {
2206  return $this->last_update;
2207  }
+ Here is the caller graph for this function:

◆ getLatitude()

ilObjUser::getLatitude ( )

Get Latitude.

Returns
string Latitude

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

References $latitude.

Referenced by ilPersonalProfileGUI\addLocationToForm().

2563  {
2564  return $this->latitude;
2565  }
+ Here is the caller graph for this function:

◆ getLocationZoom()

ilObjUser::getLocationZoom ( )

Get Location Zoom.

Returns
int Location Zoom

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

References $loc_zoom.

Referenced by ilPersonalProfileGUI\addLocationToForm().

2603  {
2604  return $this->loc_zoom;
2605  }
+ Here is the caller graph for this function:

◆ getLogin()

◆ getLoginAttempts()

ilObjUser::getLoginAttempts ( )

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

References $login_attempts.

2412  {
2413  return $this->login_attempts;
2414  }

◆ getLoginByUserId()

ilObjUser::getLoginByUserId (   $a_userid)

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

References $login, and _lookupLogin().

2790  {
2791  $login = ilObjUser::_lookupLogin($a_userid);
2792  return $login ? $login : false;
2793  }
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 2651 of file class.ilObjUser.php.

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

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

2652  {
2653  $uid = $GLOBALS['DIC']['ilAuthSession']->getUserId();
2655 
2656  // BEGIN WebDAV: Strip Microsoft Domain Names from logins
2657  require_once('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
2659  $login = self::toUsernameWithoutDomain($login);
2660  }
2661  return $login;
2662  }
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 2582 of file class.ilObjUser.php.

References $longitude.

Referenced by ilPersonalProfileGUI\addLocationToForm().

2583  {
2584  return $this->longitude;
2585  }
+ Here is the caller graph for this function:

◆ getLookingForHelp()

ilObjUser::getLookingForHelp ( )

Get help looking for.

Returns
array $value

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

References $interests_help_looking.

Referenced by updateMultiTextFields().

5416  {
5418  }
+ Here is the caller graph for this function:

◆ getLookingForHelpAsText()

ilObjUser::getLookingForHelpAsText ( )

Get help looking for as plain text.

Returns
string

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

References buildTextFromArray().

5426  {
5427  return $this->buildTextFromArray("interests_help_looking");
5428  }
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 1914 of file class.ilObjUser.php.

References $matriculation.

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

1915  {
1916  return $this->matriculation;
1917  }
+ Here is the caller graph for this function:

◆ getOfferingHelp()

ilObjUser::getOfferingHelp ( )

Get help offering.

Returns
array $value

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

References $interests_help_offered.

Referenced by updateMultiTextFields().

5386  {
5388  }
+ Here is the caller graph for this function:

◆ getOfferingHelpAsText()

ilObjUser::getOfferingHelpAsText ( )

Get help offering as plain text.

Returns
string

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

References buildTextFromArray().

5396  {
5397  return $this->buildTextFromArray("interests_help_offered");
5398  }
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 3447 of file class.ilObjUser.php.

References ilObject\getId().

3448  {
3449  return self::lookupOrgUnitsRepresentation($this->getId());
3450  }
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 1574 of file class.ilObjUser.php.

References $passwd.

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

1575  {
1576  return $this->passwd;
1577  }
+ 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 1584 of file class.ilObjUser.php.

References $passwd_type.

Referenced by ilSoapUserAdministration\__readUserData().

1585  {
1586  return $this->passwd_type;
1587  }
+ Here is the caller graph for this function:

◆ getPasswordAge()

ilObjUser::getPasswordAge ( )

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

References getLastPasswordChangeTS().

2498  {
2499  $current_ts = time();
2500  $pass_change_ts = $this->getLastPasswordChangeTS();
2501  $password_age = (int) (($current_ts - $pass_change_ts) / 86400);
2502  return $password_age;
2503  }
+ 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 2058 of file class.ilObjUser.php.

References $passwd_policy_reset.

Referenced by isPasswordChangeDemanded().

2058  : bool
2059  {
2060  return (bool) $this->passwd_policy_reset;
2061  }
+ 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 3222 of file class.ilObjUser.php.

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

3223  {
3224  global $DIC;
3225 
3226  $ilDB = $DIC['ilDB'];
3227 
3228  $set = $ilDB->queryF("SELECT MAX(insert_time) mtime FROM personal_pc_clipboard " .
3229  " WHERE user_id = %s", array("integer"), array($this->getId()));
3230  $row = $ilDB->fetchAssoc($set);
3231 
3232  $set = $ilDB->queryF(
3233  "SELECT * FROM personal_pc_clipboard " .
3234  " WHERE user_id = %s AND insert_time = %s ORDER BY order_nr ASC",
3235  array("integer", "timestamp"),
3236  array($this->getId(), $row["mtime"])
3237  );
3238  $content = array();
3239  while ($row = $ilDB->fetchAssoc($set)) {
3240  $content[] = $row["content"];
3241  }
3242 
3243  return $content;
3244  }
getId()
get object id public
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ getPersonalDataExportFile()

ilObjUser::getPersonalDataExportFile ( )

Get personal data export file.

Parameters

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

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

Referenced by sendPersonalDataFile().

5060  {
5061  include_once("./Services/Export/classes/class.ilExport.php");
5062  $dir = ilExport::_getExportDirectory($this->getId(), "xml", "usr", "personal_data");
5063  if (!is_dir($dir)) {
5064  return "";
5065  }
5066  foreach (ilUtil::getDir($dir) as $entry) {
5067  if (is_int(strpos($entry["entry"], ".zip"))) {
5068  return $entry["entry"];
5069  }
5070  }
5071 
5072  return "";
5073  }
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 3755 of file class.ilObjUser.php.

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

Referenced by ilForumAuthorInformation\getUserImagePath().

3756  {
3757  if (isset(self::$personal_image_cache[$this->getId()][$a_size][(int) $a_force_pic])) {
3758  return self::$personal_image_cache[$this->getId()][$a_size][(int) $a_force_pic];
3759  }
3760 
3761  self::$personal_image_cache[$this->getId()][$a_size][(int) $a_force_pic] = ilObjUser::_getPersonalPicturePath($this->getId(), $a_size, $a_force_pic);
3762 
3763  return self::$personal_image_cache[$this->getId()][$a_size][(int) $a_force_pic];
3764  }
getId()
get object id public
static _getPersonalPicturePath( $a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false)
Get path to personal picture.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPersonalWorkspaceDiskQuota()

ilObjUser::getPersonalWorkspaceDiskQuota ( )

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

2041  {
2042  return $this->prefs["wsp_disk_quota"] ? $this->prefs["wsp_disk_quota"] : 0;
2043  }

◆ getPhoneHome()

ilObjUser::getPhoneHome ( )

get home phone public

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

References $phone_home.

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

1839  {
1840  return $this->phone_home;
1841  }
+ Here is the caller graph for this function:

◆ getPhoneMobile()

ilObjUser::getPhoneMobile ( )

get mobile phone public

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

References $phone_mobile.

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

1858  {
1859  return $this->phone_mobile;
1860  }
+ Here is the caller graph for this function:

◆ getPhoneOffice()

ilObjUser::getPhoneOffice ( )

get office phone public

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

References $phone_office.

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

1820  {
1821  return $this->phone_office;
1822  }
+ 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 1271 of file class.ilObjUser.php.

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

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

◆ getProfileIncomplete()

ilObjUser::getProfileIncomplete ( )

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

Referenced by assignData().

2432  {
2433  if ($this->id == ANONYMOUS_USER_ID) {
2434  return false;
2435  }
2436  return $this->profile_incomplete;
2437  }
+ 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 5579 of file class.ilObjUser.php.

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

Referenced by ilInternalLink\searchUsers().

5580  {
5581  global $DIC;
5582 
5583  $ilDB = $DIC->database();
5584 
5585  $set = $ilDB->query(
5586  "SELECT * FROM usr_pref " .
5587  " WHERE keyword = " . $ilDB->quote("public_profile", "text") .
5588  " AND " . $ilDB->in("usr_id", $a_user_ids, false, "integer")
5589  );
5590  $r = array(
5591  "global" => array(),
5592  "local" => array(),
5593  "public" => array(),
5594  "not_public" => array()
5595  );
5596  while ($rec = $ilDB->fetchAssoc($set)) {
5597  if ($rec["value"] == "g") {
5598  $r["global"][] = $rec["usr_id"];
5599  $r["public"][] = $rec["usr_id"];
5600  }
5601  if ($rec["value"] == "y") {
5602  $r["local"][] = $rec["usr_id"];
5603  $r["public"][] = $rec["usr_id"];
5604  }
5605  }
5606  foreach ($a_user_ids as $id) {
5607  if (!in_array($id, $r["public"])) {
5608  $r["not_public"][] = $id;
5609  }
5610  }
5611 
5612  return $r;
5613  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 4587 of file class.ilObjUser.php.

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

4588  {
4589  if ($this->hasPublicProfile()) {
4590  return $this->getFirstname() . " " . $this->getLastname() . " (" . $this->getLogin() . ")";
4591  } else {
4592  return $this->getLogin();
4593  }
4594  }
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 1960 of file class.ilObjUser.php.

References $second_email.

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

1961  {
1962  return $this->second_email;
1963  }
+ Here is the caller graph for this function:

◆ getSelectedCountry()

ilObjUser::getSelectedCountry ( )

Get selected country (selection drop down)

Returns
string selected country

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

References $sel_country.

Referenced by deleteUserDefinedFieldEntries().

1801  {
1802  return $this->sel_country;
1803  }
+ 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 2348 of file class.ilObjUser.php.

References $active, and _lookup().

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

2349  {
2350  $active = ilObjUser::_lookup($a_id, "active");
2351  return $active ? true : false;
2352  }
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 1721 of file class.ilObjUser.php.

References $street.

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

1722  {
1723  return $this->street;
1724  }
+ Here is the caller graph for this function:

◆ getTimeFormat()

ilObjUser::getTimeFormat ( )

get time format

public

Returns

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

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

1226  {
1227  if ($format = $this->getPref('time_format')) {
1228  return $format;
1229  } else {
1230  include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
1231  $settings = ilCalendarSettings::_getInstance();
1232  return $settings->getDefaultTimeFormat();
1233  }
1234  }
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 2377 of file class.ilObjUser.php.

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

2378  {
2379  return $this->time_limit_from;
2380  }
+ Here is the caller graph for this function:

◆ getTimeLimitMessage()

ilObjUser::getTimeLimitMessage ( )

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

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

2402  {
2403  return $this->time_limit_message;
2404  }
+ Here is the caller graph for this function:

◆ getTimeLimitOwner()

ilObjUser::getTimeLimitOwner ( )

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

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

2370  {
2371  return $this->time_limit_owner ? $this->time_limit_owner : 7;
2372  }
+ Here is the caller graph for this function:

◆ getTimeLimitUnlimited()

ilObjUser::getTimeLimitUnlimited ( )

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

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

2394  {
2395  return $this->time_limit_unlimited;
2396  }
+ Here is the caller graph for this function:

◆ getTimeLimitUntil()

ilObjUser::getTimeLimitUntil ( )

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

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

2386  {
2387  return $this->time_limit_until;
2388  }
+ Here is the caller graph for this function:

◆ getTimeZone()

ilObjUser::getTimeZone ( )

get timezone of user

public

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

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

1209  {
1210  if ($tz = $this->getPref('user_tz')) {
1211  return $tz;
1212  } else {
1213  include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
1214  $settings = ilCalendarSettings::_getInstance();
1215  return $settings->getDefaultTimeZone();
1216  }
1217  }
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 3884 of file class.ilObjUser.php.

Referenced by deleteUserDefinedFieldEntries().

3885  {
3886  return $this->user_defined_data ? $this->user_defined_data : array();
3887  }
+ 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 2733 of file class.ilObjUser.php.

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

Referenced by ilObjSurvey\sendNotificationMail().

2733  : array
2734  {
2735  global $DIC;
2736 
2737  $ilias = $DIC['ilias'];
2738  $ilDB = $DIC['ilDB'];
2739 
2740  $res = $ilDB->queryF(
2741  "SELECT usr_id FROM usr_data " .
2742  "WHERE email = %s and active = 1",
2743  array("text"),
2744  array($a_email)
2745  );
2746  $ids = array();
2747  while ($row = $ilDB->fetchObject($res)) {
2748  $ids[] = $row->usr_id;
2749  }
2750 
2751  return $ids;
2752  }
foreach($_POST as $key=> $value) $res
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 4834 of file class.ilObjUser.php.

References $DIC, $query, and $res.

Referenced by ilCronDeleteInactiveUserAccounts\hasCustomSettings().

4834  : array
4835  {
4836  global $DIC;
4837 
4838  if (!is_numeric($periodInDays) && $periodInDays < 1) {
4839  throw new \ilException('Invalid period given');
4840  }
4841 
4842  $date = date('Y-m-d H:i:s', (time() - ((int) $periodInDays * 24 * 60 * 60)));
4843 
4844  $query = "SELECT usr_id FROM usr_data WHERE last_login IS NOT NULL AND last_login < %s";
4845 
4846  $ids = [];
4847 
4848  $types = ['timestamp'];
4849  $values = [$date];
4850 
4851  $res = $DIC->database()->queryF($query, $types, $values);
4852  while ($row = $DIC->database()->fetchAssoc($res)) {
4853  $ids[] = $row['usr_id'];
4854  }
4855 
4856  return $ids;
4857  }
foreach($_POST as $key=> $value) $res
$query
$DIC
Definition: xapitoken.php:46
+ 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 4864 of file class.ilObjUser.php.

References $DIC, $query, and $res.

Referenced by ilCronDeleteNeverLoggedInUserAccounts\run().

4864  : array
4865  {
4866  global $DIC;
4867 
4868  $date = date('Y-m-d H:i:s', (time() - ((int) $thresholdInDays * 24 * 60 * 60)));
4869 
4870  $query = "SELECT usr_id FROM usr_data WHERE last_login IS NULL AND create_date < %s";
4871 
4872  $ids = [];
4873 
4874  $types = ['timestamp'];
4875  $values = [$date];
4876 
4877  $res = $DIC->database()->queryF($query, $types, $values);
4878  while ($row = $DIC->database()->fetchAssoc($res)) {
4879  $ids[] = $row['usr_id'];
4880  }
4881 
4882  return $ids;
4883  }
foreach($_POST as $key=> $value) $res
$query
$DIC
Definition: xapitoken.php:46
+ 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 2761 of file class.ilObjUser.php.

References $DIC, $ilDB, and $res.

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

2761  : array
2762  {
2763  global $DIC;
2764 
2765  $ilDB = $DIC->database();
2766 
2767  $res = $ilDB->queryF(
2768  "SELECT login FROM usr_data " .
2769  "WHERE email = %s and active = 1",
2770  array("text"),
2771  array($a_email)
2772  );
2773  $ids = array();
2774  while ($row = $ilDB->fetchObject($res)) {
2775  $ids[] = $row->login;
2776  }
2777 
2778  return $ids;
2779  }
foreach($_POST as $key=> $value) $res
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 5249 of file class.ilObjUser.php.

References $DIC, $ilDB, and $ret.

Referenced by ilAwarenessUserCollector\collectUsers().

5250  {
5251  global $DIC;
5252 
5253  $ilDB = $DIC['ilDB'];
5254 
5255  $date_is = ($a_agreed)
5256  ? "IS NOT NULL"
5257  : "IS NULL";
5258 
5259  $users = (is_array($a_users))
5260  ? " AND " . $ilDB->in("usr_id", $a_users, false, "integer")
5261  : "";
5262 
5263  $set = $ilDB->query("SELECT usr_id FROM usr_data " .
5264  " WHERE agree_date " . $date_is .
5265  $users);
5266  $ret = array();
5267  while ($rec = $ilDB->fetchAssoc($set)) {
5268  $ret[] = $rec["usr_id"];
5269  }
5270  return $ret;
5271  }
global $ilDB
$ret
Definition: parser.php:6
$DIC
Definition: xapitoken.php:46
+ 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 4490 of file class.ilObjUser.php.

References $DIC, and $ilDB.

Referenced by ilAwarenessUserCollector\collectUsers().

4491  {
4492  global $DIC;
4493 
4494  $ilDB = $DIC['ilDB'];
4495 
4496  $users = array();
4497  $set = $ilDB->query(
4498  "SELECT usr_id FROM usr_pref " .
4499  " WHERE keyword = " . $ilDB->quote($a_keyword, "text") .
4500  " AND " . $ilDB->in("usr_id", $a_user_ids, false, "integer") .
4501  " AND value = " . $ilDB->quote($a_val, "text")
4502  );
4503  while ($rec = $ilDB->fetchAssoc($set)) {
4504  $users[] = $rec["usr_id"];
4505  }
4506  return $users;
4507  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 1626 of file class.ilObjUser.php.

References $utitle.

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

1627  {
1628  return $this->utitle;
1629  }
+ Here is the caller graph for this function:

◆ getZipcode()

ilObjUser::getZipcode ( )

get zipcode public

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

References $zipcode.

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

1760  {
1761  return $this->zipcode;
1762  }
+ 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 2613 of file class.ilObjUser.php.

References $DIC, and $ilDB.

Referenced by ilAuthFrontend\checkSimultaneousLogins().

2614  {
2615  global $DIC;
2616 
2617  $ilDB = $DIC['ilDB'];
2618 
2619  $set = $ilDB->queryf(
2620  '
2621  SELECT COUNT(*) session_count
2622  FROM usr_session WHERE user_id = %s AND expires > %s AND session_id != %s ',
2623  array('integer', 'integer', 'text'),
2624  array($a_user_id, time(), $a_session_id)
2625  );
2626  $row = $ilDB->fetchAssoc($set);
2627  return (bool) $row['session_count'];
2628  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ hasDeletionFlag()

ilObjUser::hasDeletionFlag ( )

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

References getPref().

5318  {
5319  return (bool) $this->getPref("delete_flag");
5320  }
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 4577 of file class.ilObjUser.php.

References getPref().

Referenced by getPublicName().

4578  {
4579  return in_array($this->getPref("public_profile"), array("y", "g"));
4580  }
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 5198 of file class.ilObjUser.php.

References $DIC, $ilDB, $in, $res, ilObject\getId(), ilTermsOfServiceHelper\isEnabled(), and login().

Referenced by ilSoapUserAdministration\__readUserData().

5199  {
5200  require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
5201 
5202  if (
5204  null == $this->agree_date &&
5205  'root' != $this->login &&
5206  !in_array($this->getId(), array(ANONYMOUS_USER_ID, SYSTEM_USER_ID))
5207  ) {
5208  return true;
5209  }
5210 
5211  return false;
5212  }
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 5278 of file class.ilObjUser.php.

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

Referenced by ilTermsOfServiceHelper\trackAcceptance().

5279  {
5280  if (null === $status) {
5281  return ilSession::get('has_to_accept_agr_in_session');
5282  }
5283 
5284  require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
5286  ilSession::set('has_to_accept_agr_in_session', (int) $status);
5287  }
5288  }
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 5097 of file class.ilObjUser.php.

5103  {
5104  include_once("./Services/Export/classes/class.ilImport.php");
5105  $imp = new ilImport();
5106  // bookmarks need to be skipped, importer does not exist anymore
5107  $imp->addSkipImporter("Services/Bookmarks");
5108  if (!$a_profile_data) {
5109  $imp->addSkipEntity("Services/User", "usr_profile");
5110  }
5111  if (!$a_settings) {
5112  $imp->addSkipEntity("Services/User", "usr_setting");
5113  }
5114  if (!$a_notes) {
5115  $imp->addSkipEntity("Services/Notes", "user_notes");
5116  }
5117  if (!$a_calendar) {
5118  $imp->addSkipEntity("Services/Calendar", "calendar");
5119  }
5120  $imp->importEntity(
5121  $a_file["tmp_name"],
5122  $a_file["name"],
5123  "personal_data",
5124  "Services/User"
5125  );
5126  }
Import class.

◆ initInactivationDate()

static ilObjUser::initInactivationDate (   $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  $NOW = $ilDB->now();
5140 
5141  $usrId_IN_usrIds = $ilDB->in('usr_id', $usrIds, false, 'integer');
5142 
5143  $queryString = "
5144  UPDATE usr_data
5145  SET inactivation_date = $NOW
5146  WHERE inactivation_date IS NULL
5147  AND $usrId_IN_usrIds
5148  ";
5149 
5150  $ilDB->manipulate($queryString);
5151  }
global $ilDB
$DIC
Definition: xapitoken.php:46

◆ isAnonymous()

ilObjUser::isAnonymous ( )
Returns
bool

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

References ilObject\getId().

Referenced by ilUsersGalleryGUI\addActionSection().

5294  {
5295  return self::_isAnonymous($this->getId());
5296  }
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 5015 of file class.ilObjUser.php.

References $_SESSION.

5016  {
5017  return (boolean) $_SESSION["user_captcha_verified"];
5018  }
$_SESSION["AccountId"]

◆ isCurrentUserActive()

ilObjUser::isCurrentUserActive ( )

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

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

2691  {
2692  global $DIC;
2693 
2694  $ilDB = $DIC['ilDB'];
2695 
2697  $set = $ilDB->queryF(
2698  "SELECT active FROM usr_data WHERE login= %s",
2699  array("text"),
2700  array($login)
2701  );
2702  //query has got a result
2703  if ($rec = $ilDB->fetchAssoc($set)) {
2704  if ($rec["active"]) {
2705  return true;
2706  }
2707  }
2708 
2709  return false;
2710  }
$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 $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ isPasswordChangeDemanded()

ilObjUser::isPasswordChangeDemanded ( )
Returns
bool

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

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

2443  {
2444  if ($this->id == ANONYMOUS_USER_ID) {
2445  return false;
2446  }
2447 
2448  if ($this->id == SYSTEM_USER_ID) {
2449  if (
2450  \ilUserPasswordManager::getInstance()->verifyPassword($this, base64_decode('aG9tZXI=')) &&
2452  ) {
2453  return true;
2454  } else {
2455  return false;
2456  }
2457  }
2458 
2459  $security = ilSecuritySettings::_getInstance();
2460 
2461  $authModeAllowsPasswordChange = !ilAuthUtils::_needsExternalAccountByAuthMode($this->getAuthMode(true));
2462  $passwordResetOnFirstLogin = (
2463  $security->isPasswordChangeOnFirstLoginEnabled() &&
2464  $this->getLastPasswordChangeTS() == 0 && $this->is_self_registered == false
2465  );
2466  $passwordResetOnChangedPolicy = $this->getPasswordPolicyResetStatus();
2467 
2468  return ($authModeAllowsPasswordChange && ($passwordResetOnFirstLogin || $passwordResetOnChangedPolicy));
2469  }
getAuthMode($a_auth_key=false)
get auth mode public
getPasswordPolicyResetStatus()
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 2471 of file class.ilObjUser.php.

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

2472  {
2473  if ($this->id == ANONYMOUS_USER_ID) {
2474  return false;
2475  }
2476 
2477  require_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
2478  $security = ilSecuritySettings::_getInstance();
2479  if ($this->getLastPasswordChangeTS() > 0) {
2480  $max_pass_age = $security->getPasswordMaxAge();
2481  if ($max_pass_age > 0) {
2482  $max_pass_age_ts = ($max_pass_age * 86400);
2483  $pass_change_ts = $this->getLastPasswordChangeTS();
2484  $current_ts = time();
2485 
2486  if (($current_ts - $pass_change_ts) > $max_pass_age_ts) {
2488  return true;
2489  }
2490  }
2491  }
2492  }
2493 
2494  return false;
2495  }
getAuthMode($a_auth_key=false)
get auth mode public
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 5330 of file class.ilObjUser.php.

References $is_self_registered.

5331  {
5332  return (bool) $this->is_self_registered;
5333  }

◆ lookupMatriculation()

static ilObjUser::lookupMatriculation (   $a_usr_id)
static

Lookup matriculation.

Returns
string matricualtion
Parameters
int$a_usr_idpublic

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

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

Referenced by ilObjCourseGrouping\_checkGroupingDependencies().

1926  {
1927  global $DIC;
1928 
1929  $ilDB = $DIC['ilDB'];
1930 
1931  $query = "SELECT matriculation FROM usr_data " .
1932  "WHERE usr_id = " . $ilDB->quote($a_usr_id);
1933  $res = $ilDB->query($query);
1934  $row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT);
1935  return $row->matriculation ? $row->matriculation : '';
1936  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 3437 of file class.ilObjUser.php.

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

3438  {
3439  require_once('./Modules/OrgUnit/classes/PathStorage/class.ilOrgUnitPathStorage.php');
3440  return ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($a_usr_id);
3441  }
+ 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)
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
$DIC
Definition: xapitoken.php:46
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 5447 of file class.ilObjUser.php.

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

Referenced by read().

5448  {
5449  global $DIC;
5450 
5451  $ilDB = $DIC['ilDB'];
5452 
5453  if (!$this->getId()) {
5454  return;
5455  }
5456 
5457  $set = $ilDB->query("SELECT field_id,value" .
5458  " FROM usr_data_multi" .
5459  " WHERE usr_id = " . $ilDB->quote($this->getId(), "integer") .
5460  " ORDER BY value");
5461  while ($row = $ilDB->fetchAssoc($set)) {
5462  $values[$row["field_id"]][] = $row["value"];
5463  }
5464 
5465  if (isset($values["interests_general"])) {
5466  $this->setGeneralInterests($values["interests_general"]);
5467  } else {
5468  $this->setGeneralInterests();
5469  }
5470  if (isset($values["interests_help_offered"])) {
5471  $this->setOfferingHelp($values["interests_help_offered"]);
5472  } else {
5473  $this->setOfferingHelp();
5474  }
5475  if (isset($values["interests_help_looking"])) {
5476  $this->setLookingForHelp($values["interests_help_looking"]);
5477  } else {
5478  $this->setLookingForHelp();
5479  }
5480  }
setOfferingHelp(array $value=null)
Set help offering.
getId()
get object id public
setGeneralInterests(array $value=null)
Set general interests.
setLookingForHelp(array $value=null)
Set help looking for.
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 1300 of file class.ilObjUser.php.

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

Referenced by read().

1301  {
1302  global $DIC;
1303 
1304  $ilDB = $DIC['ilDB'];
1305 
1306  if (is_array($this->prefs)) {
1307  $this->oldPrefs = $this->prefs;
1308  }
1309 
1310  $this->prefs = ilObjUser::_getPreferences($this->id);
1311  }
global $ilDB
$DIC
Definition: xapitoken.php:46
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 3933 of file class.ilObjUser.php.

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

Referenced by read().

3934  {
3935  global $DIC;
3936 
3937  $ilDB = $DIC['ilDB'];
3938 
3939  include_once("./Services/User/classes/class.ilUserDefinedData.php");
3940  $udata = new ilUserDefinedData($this->getId());
3941 
3942  /* $query = "SELECT * FROM udf_data ".
3943  "WHERE usr_id = ".$ilDB->quote($this->getId(),'integer');
3944 
3945  $res = $this->db->query($query);
3946  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_ASSOC))
3947  {
3948  $this->user_defined_data = $row;
3949  }*/
3950 
3951  $this->user_defined_data = $udata->getAll();
3952 
3953  return true;
3954  }
Class ilUserDefinedData.
getId()
get object id public
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 880 of file class.ilObjUser.php.

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

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

◆ removeDeletionFlag()

ilObjUser::removeDeletionFlag ( )

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

References writePref().

5313  {
5314  $this->writePref("delete_flag", false);
5315  }
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 3403 of file class.ilObjUser.php.

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

3404  {
3405  global $DIC;
3406 
3407  $ilDB = $DIC['ilDB'];
3408 
3409  $q = "DELETE FROM personal_clipboard WHERE " .
3410  "item_id = " . $ilDB->quote($a_item_id, "integer") .
3411  " AND type = " . $ilDB->quote($a_type, "text") . " " .
3412  " AND user_id = " . $ilDB->quote($this->getId(), "integer");
3413  $ilDB->manipulate($q);
3414  }
$a_type
Definition: workflow.php:92
getId()
get object id public
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ removeUserPicture()

ilObjUser::removeUserPicture (   $a_do_update = true)

Remove user picture.

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

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

Referenced by delete().

3836  {
3837  $webspace_dir = ilUtil::getWebspaceDir();
3838  $image_dir = $webspace_dir . "/usr_images";
3839  $file = $image_dir . "/usr_" . $this->getID() . "." . "jpg";
3840  $thumb_file = $image_dir . "/usr_" . $this->getID() . "_small.jpg";
3841  $xthumb_file = $image_dir . "/usr_" . $this->getID() . "_xsmall.jpg";
3842  $xxthumb_file = $image_dir . "/usr_" . $this->getID() . "_xxsmall.jpg";
3843  $upload_file = $image_dir . "/upload_" . $this->getID();
3844 
3845  if ($a_do_update) {
3846  // remove user pref file name
3847  $this->setPref("profile_image", "");
3848  $this->update();
3849  }
3850 
3851  if (@is_file($file)) {
3852  unlink($file);
3853  }
3854  if (@is_file($thumb_file)) {
3855  unlink($thumb_file);
3856  }
3857  if (@is_file($xthumb_file)) {
3858  unlink($xthumb_file);
3859  }
3860  if (@is_file($xxthumb_file)) {
3861  unlink($xxthumb_file);
3862  }
3863  if (@is_file($upload_file)) {
3864  unlink($upload_file);
3865  }
3866  }
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 5158 of file class.ilObjUser.php.

References $DIC, and $ilDB.

5159  {
5160  global $DIC;
5161 
5162  $ilDB = $DIC['ilDB'];
5163 
5164  $usrId_IN_usrIds = $ilDB->in('usr_id', $usrIds, false, 'integer');
5165 
5166  $queryString = "
5167  UPDATE usr_data
5168  SET inactivation_date = NULL
5169  WHERE $usrId_IN_usrIds
5170  ";
5171 
5172  $ilDB->manipulate($queryString);
5173  }
global $ilDB
$DIC
Definition: xapitoken.php:46

◆ resetLastPasswordChange()

ilObjUser::resetLastPasswordChange ( )

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

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

2528  {
2529  global $DIC;
2530 
2531  $ilDB = $DIC['ilDB'];
2532 
2533  $query = "UPDATE usr_data SET last_password_change = 0 " .
2534  "WHERE usr_id = %s";
2535  $affected = $ilDB->manipulateF(
2536  $query,
2537  array('integer'),
2538  array($this->getId())
2539  );
2540  if ($affected) {
2541  return true;
2542  } else {
2543  return false;
2544  }
2545  }
getId()
get object id public
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ resetOwner()

ilObjUser::resetOwner ( )

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

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

Referenced by delete().

4957  {
4958  global $DIC;
4959 
4960  $ilDB = $DIC['ilDB'];
4961 
4962  $query = "UPDATE object_data SET owner = 0 " .
4963  "WHERE owner = " . $ilDB->quote($this->getId(), 'integer');
4964  $ilDB->query($query);
4965 
4966  return true;
4967  }
getId()
get object id public
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 2805 of file class.ilObjUser.php.

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

Referenced by ilObjUserTest\testSearch().

2806  {
2807  global $DIC;
2808 
2809  $ilias = $DIC['ilias'];
2810  $ilDB = $DIC['ilDB'];
2811  $ilLog = $DIC['ilLog'];
2812 
2813 
2814  $query = "SELECT usr_data.usr_id, usr_data.login, usr_data.firstname, usr_data.lastname, usr_data.email, usr_data.active FROM usr_data ";
2815 
2816  $without_anonymous_users = true;
2817 
2818  // determine join filter
2819  $join_filter = " WHERE ";
2820  if ($filter_settings !== false && strlen($filter_settings)) {
2821  switch ($filter_settings) {
2822  case 3:
2823  // show only users without courses
2824  $join_filter = " LEFT JOIN obj_members ON usr_data.usr_id = obj_members.usr_id WHERE obj_members.usr_id IS NULL AND ";
2825  break;
2826  case 5:
2827  // show only users with a certain course membership
2828  $ref_id = $_SESSION["user_filter_data"];
2829  if ($ref_id) {
2830  $join_filter = " LEFT JOIN obj_members ON usr_data.usr_id = obj_members.usr_id WHERE obj_members.obj_id = " .
2831  "(SELECT obj_id FROM object_reference WHERE ref_id = " . $ilDB->quote($ref_id, "integer") . ") AND ";
2832  }
2833  break;
2834  case 6:
2835  global $DIC;
2836 
2837  $rbacreview = $DIC['rbacreview'];
2838  $ref_id = $_SESSION["user_filter_data"];
2839  if ($ref_id) {
2840  $local_roles = $rbacreview->getRolesOfRoleFolder($ref_id, false);
2841  if (is_array($local_roles) && count($local_roles)) {
2842  $join_filter = " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE " .
2843  $ilDB->in("rbac_ua.rol_id", $local_roles, false, $local_roles) . " AND ";
2844  }
2845  }
2846  break;
2847  case 7:
2848  global $DIC;
2849 
2850  $rbacreview = $DIC['rbacreview'];
2851  $rol_id = $_SESSION["user_filter_data"];
2852  if ($rol_id) {
2853  $join_filter = " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE rbac_ua.rol_id = " .
2854  $ilDB->quote($rol_id, "integer") . " AND ";
2855  $without_anonymous_users = false;
2856  }
2857  break;
2858  }
2859  }
2860  // This is a temporary hack to search users by their role
2861  // See Mantis #338. This is a hack due to Mantis #337.
2862  if (strtolower(substr($a_search_str, 0, 5)) == "role:") {
2863  $query = "SELECT DISTINCT usr_data.usr_id,usr_data.login,usr_data.firstname,usr_data.lastname,usr_data.email " .
2864  "FROM object_data,rbac_ua,usr_data " .
2865  "WHERE " . $ilDB->like("object_data.title", "text", "%" . substr($a_search_str, 5) . "%") .
2866  " AND object_data.type = 'role' " .
2867  "AND rbac_ua.rol_id = object_data.obj_id " .
2868  "AND usr_data.usr_id = rbac_ua.usr_id " .
2869  "AND rbac_ua.usr_id != " . $ilDB->quote(ANONYMOUS_USER_ID, "integer");
2870  } else {
2871  $query .= $join_filter .
2872  "(" . $ilDB->like("usr_data.login", "text", "%" . $a_search_str . "%") . " " .
2873  "OR " . $ilDB->like("usr_data.firstname", "text", "%" . $a_search_str . "%") . " " .
2874  "OR " . $ilDB->like("usr_data.lastname", "text", "%" . $a_search_str . "%") . " " .
2875  "OR " . $ilDB->like("usr_data.email", "text", "%" . $a_search_str . "%") . ") ";
2876 
2877  if ($filter_settings !== false && strlen($filter_settings)) {
2878  switch ($filter_settings) {
2879  case 0:
2880  $query .= " AND usr_data.active = " . $ilDB->quote(0, "integer") . " ";
2881  break;
2882  case 1:
2883  $query .= " AND usr_data.active = " . $ilDB->quote(1, "integer") . " ";
2884  break;
2885  case 2:
2886  $query .= " AND usr_data.time_limit_unlimited = " . $ilDB->quote(0, "integer") . " ";
2887  break;
2888  case 4:
2889  $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"]));
2890  $query .= " AND last_login < " . $ilDB->quote($date, "timestamp") . " ";
2891  break;
2892  }
2893  }
2894 
2895  if ($without_anonymous_users) {
2896  $query .= "AND usr_data.usr_id != " . $ilDB->quote(ANONYMOUS_USER_ID, "integer");
2897  }
2898 
2899  if (is_numeric($active) && $active > -1 && $filter_settings === false) {
2900  $query .= " AND active = " . $ilDB->quote($active, "integer") . " ";
2901  }
2902  }
2903  $ilLog->write($query);
2904  $res = $ilDB->query($query);
2905  while ($row = $ilDB->fetchObject($res)) {
2906  $users[] = array(
2907  "usr_id" => $row->usr_id,
2908  "login" => $row->login,
2909  "firstname" => $row->firstname,
2910  "lastname" => $row->lastname,
2911  "email" => $row->email,
2912  "active" => $row->active);
2913  $ids[] = $row->usr_id;
2914  }
2915  if ($a_return_ids_only) {
2916  return $ids ? $ids : array();
2917  } else {
2918  return $users ? $users : array();
2919  }
2920  }
$_SESSION["AccountId"]
foreach($_POST as $key=> $value) $res
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ sendPersonalDataFile()

ilObjUser::sendPersonalDataFile ( )

Send personal data file.

Parameters

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

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

5082  {
5083  include_once("./Services/Export/classes/class.ilExport.php");
5084  $file = ilExport::_getExportDirectory($this->getId(), "xml", "usr", "personal_data") .
5085  "/" . $this->getPersonalDataExportFile();
5086  if (is_file($file)) {
5088  }
5089  }
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 2277 of file class.ilObjUser.php.

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

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

2278  {
2279  $this->setOwner($a_owner);
2280 
2281  if ($a_active) {
2282  $this->active = 1;
2283  $this->setApproveDate(date('Y-m-d H:i:s'));
2284  $this->setOwner($a_owner);
2285  } else {
2286  $this->active = 0;
2287  $this->setApproveDate(null);
2288  }
2289  }
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 2265 of file class.ilObjUser.php.

2266  {
2267  $this->agree_date = $a_str;
2268  }

◆ 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 2234 of file class.ilObjUser.php.

Referenced by setActive().

2235  {
2236  $this->approve_date = $a_str;
2237  }
+ Here is the caller graph for this function:

◆ setAuthMode()

ilObjUser::setAuthMode (   $a_str)

set auth mode public

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

Referenced by assignData().

3458  {
3459  $this->auth_mode = $a_str;
3460  }
+ Here is the caller graph for this function:

◆ setBirthday()

ilObjUser::setBirthday (   $a_birthday)

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

References IL_CAL_DATE.

Referenced by assignData().

4813  {
4814  if (strlen($a_birthday)) {
4815  $date = new ilDate($a_birthday, IL_CAL_DATE);
4816  $this->birthday = $date->get(IL_CAL_DATE);
4817  } else {
4818  $this->birthday = null;
4819  }
4820  }
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 5025 of file class.ilObjUser.php.

References $_SESSION.

5026  {
5027  $_SESSION["user_captcha_verified"] = $a_val;
5028  }
$_SESSION["AccountId"]

◆ setCity()

ilObjUser::setCity (   $a_str)

set city public

Parameters
stringcity

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

Referenced by assignData().

1732  {
1733  $this->city = $a_str;
1734  }
+ Here is the caller graph for this function:

◆ setClientIP()

ilObjUser::setClientIP (   $a_str)

set client ip number public

Parameters
stringclient ip

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

Referenced by assignData().

1887  {
1888  $this->client_ip = $a_str;
1889  }
+ Here is the caller graph for this function:

◆ setComment()

ilObjUser::setComment (   $a_str)

set referral comment public

Parameters
stringhobby

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

Referenced by assignData().

2215  {
2216  $this->referral_comment = $a_str;
2217  }
+ Here is the caller graph for this function:

◆ setCountry()

ilObjUser::setCountry (   $a_str)

Set country (free text)

public

Parameters
stringcountry

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

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

1771  {
1772  $this->country = $a_str;
1773  }
+ Here is the caller graph for this function:

◆ setCurrentLanguage()

ilObjUser::setCurrentLanguage (   $a_val)

Set current language.

Parameters
string$a_valcurrent language

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

References $_SESSION.

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

2135  {
2136  $_SESSION['lang'] = $a_val;
2137  }
$_SESSION["AccountId"]
+ Here is the caller graph for this function:

◆ setDepartment()

ilObjUser::setDepartment (   $a_str)

set department public

Parameters
stringdepartment

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

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

1694  {
1695  $this->department = $a_str;
1696  }
+ Here is the caller graph for this function:

◆ setDiskQuota()

ilObjUser::setDiskQuota (   $a_disk_quota)

Sets the minimal disk quota imposed by this user account.

The minimal disk quota is specified in bytes.

public

Parameters
integer

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

References setPref().

2022  {
2023  $this->setPref("disk_quota", $a_disk_quota);
2024  }
setPref($a_keyword, $a_value)
set a user preference
+ Here is the call graph for this function:

◆ setEmail()

ilObjUser::setEmail (   $a_str)

set email public

Parameters
stringemail address

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

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

1944  {
1945  $this->email = $a_str;
1946  }
+ 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 3483 of file class.ilObjUser.php.

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

3484  {
3485  $this->ext_account = $a_str;
3486  }
+ Here is the caller graph for this function:

◆ setFax()

ilObjUser::setFax (   $a_str)

set fax public

Parameters
stringfax

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

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

1868  {
1869  $this->fax = $a_str;
1870  }
+ Here is the caller graph for this function:

◆ setFirstLogin()

ilObjUser::setFirstLogin (   $a_str)

set user's first login

Parameters
stringlogin date

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

Referenced by assignData().

2164  {
2165  $this->first_login = $a_str;
2166  }
+ Here is the caller graph for this function:

◆ setFirstname()

ilObjUser::setFirstname (   $a_str)

set firstname public

Parameters
stringfirstname

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

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

1637  {
1638  $this->firstname = $a_str;
1639  }
+ 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 1475 of file class.ilObjUser.php.

References $fullname, and $lastname.

Referenced by assignData().

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

◆ setGender()

ilObjUser::setGender (   $a_str)

set gender public

Parameters
stringgender

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

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

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

◆ setGeneralInterests()

ilObjUser::setGeneralInterests ( array  $value = null)

Set general interests.

Parameters
array$value

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

Referenced by readMultiTextFields().

5346  {
5347  $this->interests_general = $value;
5348  }
+ Here is the caller graph for this function:

◆ setHobby()

ilObjUser::setHobby (   $a_str)

set hobby public

Parameters
stringhobby

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

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

1979  {
1980  $this->hobby = $a_str;
1981  }
+ Here is the caller graph for this function:

◆ setInactivationDate()

ilObjUser::setInactivationDate (   $inactivation_date)

setter for inactivation date

Parameters
string$inactivationDate

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

References $inactivation_date.

Referenced by assignData().

5181  {
5182  $this->inactivation_date = $inactivation_date;
5183  }
+ Here is the caller graph for this function:

◆ setInstitution()

ilObjUser::setInstitution (   $a_str)

set institution public

Parameters
stringinstitution

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

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

1675  {
1676  $this->institution = $a_str;
1677  }
+ Here is the caller graph for this function:

◆ setIsSelfRegistered()

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

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

Referenced by assignData().

5326  {
5327  $this->is_self_registered = (bool) $status;
5328  }
+ 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 1997 of file class.ilObjUser.php.

References $_SESSION, and setPref().

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

1998  {
1999  $this->setPref("language", $a_str);
2000  unset($_SESSION['lang']);
2001  }
$_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 2144 of file class.ilObjUser.php.

Referenced by assignData().

2145  {
2146  $this->last_login = $a_str;
2147  }
+ Here is the caller graph for this function:

◆ setLastname()

ilObjUser::setLastname (   $a_str)

set lastame public

Parameters
stringlastname

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

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

1656  {
1657  $this->lastname = $a_str;
1658  }
+ Here is the caller graph for this function:

◆ setLastPasswordChangeToNow()

ilObjUser::setLastPasswordChangeToNow ( )

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

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

2506  {
2507  global $DIC;
2508 
2509  $ilDB = $DIC['ilDB'];
2510 
2511  $this->setLastPasswordChangeTS(time());
2512 
2513  $query = "UPDATE usr_data SET last_password_change = %s " .
2514  "WHERE usr_id = %s";
2515  $affected = $ilDB->manipulateF(
2516  $query,
2517  array('integer','integer'),
2518  array($this->getLastPasswordChangeTS(),$this->id)
2519  );
2520  if ($affected) {
2521  return true;
2522  } else {
2523  return false;
2524  }
2525  }
$query
setLastPasswordChangeTS($a_last_password_change_ts)
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ setLastPasswordChangeTS()

ilObjUser::setLastPasswordChangeTS (   $a_last_password_change_ts)

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

Referenced by read(), and setLastPasswordChangeToNow().

2046  {
2047  $this->last_password_change_ts = $a_last_password_change_ts;
2048  }
+ 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 2181 of file class.ilObjUser.php.

Referenced by assignData().

2182  {
2183  $this->last_profile_prompt = $a_str;
2184  }
+ 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 2200 of file class.ilObjUser.php.

Referenced by assignData().

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

◆ setLatitude()

ilObjUser::setLatitude (   $a_latitude)

Set Latitude.

Parameters
string$a_latitudeLatitude

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

Referenced by assignData().

2553  {
2554  $this->latitude = $a_latitude;
2555  }
+ Here is the caller graph for this function:

◆ setLocationZoom()

ilObjUser::setLocationZoom (   $a_locationzoom)

Set Location Zoom.

Parameters
int$a_locationzoomLocation Zoom

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

Referenced by assignData().

2593  {
2594  $this->loc_zoom = $a_locationzoom;
2595  }
+ Here is the caller graph for this function:

◆ setLogin()

ilObjUser::setLogin (   $a_str)

set login / username public

Parameters
stringusername

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

References login().

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

1543  {
1544  $this->login = $a_str;
1545  }
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 2406 of file class.ilObjUser.php.

Referenced by read().

2407  {
2408  $this->login_attempts = $a_login_attempts;
2409  }
+ Here is the caller graph for this function:

◆ setLongitude()

ilObjUser::setLongitude (   $a_longitude)

Set Longitude.

Parameters
string$a_longitudeLongitude

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

Referenced by assignData().

2573  {
2574  $this->longitude = $a_longitude;
2575  }
+ Here is the caller graph for this function:

◆ setLookingForHelp()

ilObjUser::setLookingForHelp ( array  $value = null)

Set help looking for.

Parameters
array$value

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

Referenced by readMultiTextFields().

5406  {
5407  $this->interests_help_looking = $value;
5408  }
+ Here is the caller graph for this function:

◆ setMatriculation()

ilObjUser::setMatriculation (   $a_str)

set matriculation number public

Parameters
stringmatriculation number

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

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

1906  {
1907  $this->matriculation = $a_str;
1908  }
+ Here is the caller graph for this function:

◆ setOfferingHelp()

ilObjUser::setOfferingHelp ( array  $value = null)

Set help offering.

Parameters
array$value

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

Referenced by readMultiTextFields().

5376  {
5377  $this->interests_help_offered = $value;
5378  }
+ 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 1561 of file class.ilObjUser.php.

References $a_type.

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

1562  {
1563  $this->passwd = $a_str;
1564  $this->passwd_type = $a_type;
1565  }
$a_type
Definition: workflow.php:92
+ 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 2066 of file class.ilObjUser.php.

Referenced by read().

2067  {
2068  $this->passwd_policy_reset = $status;
2069  }
+ 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 1829 of file class.ilObjUser.php.

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

1830  {
1831  $this->phone_home = $a_str;
1832  }
+ Here is the caller graph for this function:

◆ setPhoneMobile()

ilObjUser::setPhoneMobile (   $a_str)

set mobile phone public

Parameters
stringmobile phone

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

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

1849  {
1850  $this->phone_mobile = $a_str;
1851  }
+ Here is the caller graph for this function:

◆ setPhoneOffice()

ilObjUser::setPhoneOffice (   $a_str)

set office phone public

Parameters
stringoffice phone

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

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

1811  {
1812  $this->phone_office = $a_str;
1813  }
+ 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 1259 of file class.ilObjUser.php.

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

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

◆ setProfileIncomplete()

ilObjUser::setProfileIncomplete (   $a_prof_inc)

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

Referenced by assignData().

2428  {
2429  $this->profile_incomplete = (boolean) $a_prof_inc;
2430  }
+ Here is the caller graph for this function:

◆ setSecondEmail()

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

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

References $second_email.

Referenced by assignData().

1969  {
1970  $this->second_email = $second_email;
1971  }
+ 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 1790 of file class.ilObjUser.php.

Referenced by assignData().

1791  {
1792  $this->sel_country = $a_val;
1793  }
+ 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 2359 of file class.ilObjUser.php.

2360  {
2361  // TODO: exception handling (dir exists)
2362  $this->skin = $a_str;
2363  }

◆ setStreet()

ilObjUser::setStreet (   $a_str)

set street public

Parameters
stringstreet

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

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

1713  {
1714  $this->street = $a_str;
1715  }
+ Here is the caller graph for this function:

◆ setTimeLimitFrom()

ilObjUser::setTimeLimitFrom (   $a_from)

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

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

2374  {
2375  $this->time_limit_from = $a_from;
2376  }
+ Here is the caller graph for this function:

◆ setTimeLimitMessage()

ilObjUser::setTimeLimitMessage (   $a_time_limit_message)

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

Referenced by assignData().

2398  {
2399  return $this->time_limit_message = $a_time_limit_message;
2400  }
+ Here is the caller graph for this function:

◆ setTimeLimitOwner()

ilObjUser::setTimeLimitOwner (   $a_owner)

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

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

2366  {
2367  $this->time_limit_owner = $a_owner;
2368  }
+ Here is the caller graph for this function:

◆ setTimeLimitUnlimited()

ilObjUser::setTimeLimitUnlimited (   $a_unlimited)

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

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

2390  {
2391  $this->time_limit_unlimited = $a_unlimited;
2392  }
+ Here is the caller graph for this function:

◆ setTimeLimitUntil()

ilObjUser::setTimeLimitUntil (   $a_until)

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

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

2382  {
2383  $this->time_limit_until = $a_until;
2384  }
+ Here is the caller graph for this function:

◆ setUserDefinedData()

ilObjUser::setUserDefinedData (   $a_data)

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

References $data.

3870  {
3871  if (!is_array($a_data)) {
3872  return false;
3873  }
3874  foreach ($a_data as $field => $data) {
3875  #$new_data[$field] = ilUtil::stripSlashes($data);
3876  // Assign it directly to avoid update problems of unchangable fields
3877  $this->user_defined_data['f_' . $field] = $data;
3878  }
3879  #$this->user_defined_data = $new_data;
3880 
3881  return true;
3882  }
$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 1615 of file class.ilObjUser.php.

Referenced by assignData().

1616  {
1617  $this->utitle = $a_str;
1618  }
+ Here is the caller graph for this function:

◆ setZipcode()

ilObjUser::setZipcode (   $a_str)

set zipcode public

Parameters
stringzipcode

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

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

1751  {
1752  $this->zipcode = $a_str;
1753  }
+ 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 2324 of file class.ilObjUser.php.

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

Referenced by assignData().

2325  {
2326  $storedActive = 0;
2327  if ($this->getStoredActive($this->id)) {
2328  $storedActive = 1;
2329  }
2330 
2331  $currentActive = 0;
2332  if ($this->active) {
2333  $currentActive = 1;
2334  }
2335 
2336  if ((!empty($storedActive) && empty($currentActive)) ||
2337  (empty($storedActive) && !empty($currentActive))) {
2338  $this->setActive($currentActive, self::getUserIdByLogin(ilObjUser::getLoginFromAuth()));
2339  }
2340  }
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 2670 of file class.ilObjUser.php.

2671  {
2672  // Remove all characters including the last slash or the last backslash
2673  // in the username
2674  $pos = strrpos($a_login, '/');
2675  $pos2 = strrpos($a_login, '\\');
2676  if ($pos === false || $pos < $pos2) {
2677  $pos = $pos2;
2678  }
2679  if ($pos !== false) {
2680  $a_login = substr($a_login, $pos + 1);
2681  }
2682  return $a_login;
2683  }

◆ updateLogin()

ilObjUser::updateLogin (   $a_login)

update login name

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

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

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

1019  {
1020  global $DIC;
1021 
1022  $ilDB = $DIC['ilDB'];
1023  $ilSetting = $DIC['ilSetting'];
1024 
1025  if (func_num_args() != 1) {
1026  return false;
1027  }
1028 
1029  if (!isset($a_login)) {
1030  return false;
1031  }
1032 
1033  $former_login = self::_lookupLogin($this->getId());
1034 
1035  // Update not necessary
1036  if (0 == strcmp($a_login, $former_login)) {
1037  return false;
1038  }
1039 
1040  try {
1041  $last_history_entry = ilObjUser::_getLastHistoryDataByUserId($this->getId());
1042  } catch (ilUserException $e) {
1043  $last_history_entry = null;
1044  }
1045 
1046  // throw exception if the desired loginame is already in history and it is not allowed to reuse it
1047  if ((int) $ilSetting->get('allow_change_loginname') &&
1048  (int) $ilSetting->get('reuse_of_loginnames') == 0 &&
1049  self::_doesLoginnameExistInHistory($a_login)) {
1050  throw new ilUserException($this->lng->txt('loginname_already_exists'));
1051  } elseif ((int) $ilSetting->get('allow_change_loginname') &&
1052  (int) $ilSetting->get('loginname_change_blocking_time') &&
1053  is_array($last_history_entry) &&
1054  $last_history_entry[1] + (int) $ilSetting->get('loginname_change_blocking_time') > time()) {
1055  include_once 'Services/Calendar/classes/class.ilDate.php';
1056  throw new ilUserException(
1057  sprintf(
1058  $this->lng->txt('changing_loginname_not_possible_info'),
1060  new ilDateTime($last_history_entry[1], IL_CAL_UNIX)
1061  ),
1063  new ilDateTime(($last_history_entry[1] + (int) $ilSetting->get('loginname_change_blocking_time')), IL_CAL_UNIX)
1064  )
1065  )
1066  );
1067  } else {
1068  // log old loginname in history
1069  if ((int) $ilSetting->get('allow_change_loginname') &&
1070  (int) $ilSetting->get('create_history_loginname')) {
1071  ilObjUser::_writeHistory($this->getId(), $former_login);
1072  }
1073 
1074  //update login
1075  $this->login = $a_login;
1076 
1077  $ilDB->manipulateF(
1078  '
1079  UPDATE usr_data
1080  SET login = %s
1081  WHERE usr_id = %s',
1082  array('text', 'integer'),
1083  array($this->getLogin(), $this->getId())
1084  );
1085  }
1086 
1087  return true;
1088  }
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 $ilSetting
Definition: privfeed.php:17
global $ilDB
$DIC
Definition: xapitoken.php:46
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 5487 of file class.ilObjUser.php.

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

Referenced by assignData().

5488  {
5489  global $DIC;
5490 
5491  $ilDB = $DIC['ilDB'];
5492 
5493  if (!$this->getId()) {
5494  return;
5495  }
5496 
5497  if (!$a_create) {
5498  $this->deleteMultiTextFields();
5499  }
5500 
5501  $map = array(
5502  "interests_general" => $this->getGeneralInterests(),
5503  "interests_help_offered" => $this->getOfferingHelp(),
5504  "interests_help_looking" => $this->getLookingForHelp()
5505  );
5506 
5507  foreach ($map as $id => $values) {
5508  if (is_array($values) && sizeof($values)) {
5509  foreach ($values as $value) {
5510  $value = trim($value);
5511  if ($value) {
5512  $uniq_id = $ilDB->nextId('usr_data_multi');
5513 
5514  $ilDB->manipulate("INSERT usr_data_multi" .
5515  " (id,usr_id,field_id,value) VALUES" .
5516  " (" . $ilDB->quote($uniq_id, "integer") .
5517  "," . $ilDB->quote($this->getId(), "integer") .
5518  "," . $ilDB->quote($id, "text") .
5519  "," . $ilDB->quote($value, "text") .
5520  ")");
5521  }
5522  }
5523  }
5524  }
5525  }
getLookingForHelp()
Get help looking for.
getGeneralInterests()
Get general interests.
getId()
get object id public
getOfferingHelp()
Get help offering.
deleteMultiTextFields()
Remove multi-text values from DB.
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateUserDefinedFields()

ilObjUser::updateUserDefinedFields ( )

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

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

Referenced by assignData().

3890  {
3891  global $DIC;
3892 
3893  $ilDB = $DIC['ilDB'];
3894 
3895  $fields = '';
3896 
3897  $field_def = array();
3898 
3899  include_once("./Services/User/classes/class.ilUserDefinedData.php");
3900  $udata = new ilUserDefinedData($this->getId());
3901 
3902  foreach ($this->user_defined_data as $field => $value) {
3903  if ($field != 'usr_id') {
3904  // $field_def[$field] = array('text',$value);
3905  $udata->set($field, $value);
3906  }
3907  }
3908  $udata->update();
3909 
3910  /* if(!$field_def)
3911  {
3912  return true;
3913  }
3914 
3915  $query = "SELECT usr_id FROM udf_data WHERE usr_id = ".$ilDB->quote($this->getId(),'integer');
3916  $res = $ilDB->query($query);
3917 
3918 
3919  if($res->numRows())
3920  {
3921  // Update
3922  $ilDB->update('udf_data',$field_def,array('usr_id' => array('integer',$this->getId())));
3923  }
3924  else
3925  {
3926  $field_def['usr_id'] = array('integer',$this->getId());
3927  $ilDB->insert('udf_data',$field_def);
3928  }
3929  */
3930  return true;
3931  }
Class ilUserDefinedData.
getId()
get object id public
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 4997 of file class.ilObjUser.php.

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

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

4998  {
4999  global $DIC;
5000 
5001  $ilDB = $DIC['ilDB'];
5002 
5003  $query = 'SELECT count(*) num FROM object_data od ' .
5004  'JOIN usr_data ud ON obj_id = usr_id ' .
5005  'WHERE ' . $ilDB->in('obj_id', $a_usr_ids, false, 'integer') . ' ';
5006  $res = $ilDB->query($query);
5007  $num_rows = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)->num;
5008  return $num_rows == count((array) $a_usr_ids);
5009  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ writeAccepted()

ilObjUser::writeAccepted ( )

write accept date of user agreement to db

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

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

Referenced by ilTermsOfServiceHelper\trackAcceptance().

673  {
674  global $DIC;
675 
676  $ilDB = $DIC['ilDB'];
677 
678  $ilDB->manipulateF("UPDATE usr_data SET agree_date = " . $ilDB->now() .
679  " WHERE usr_id = %s", array("integer"), array($this->getId()));
680  }
getId()
get object id public
global $ilDB
$DIC
Definition: xapitoken.php:46
+ 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 1096 of file class.ilObjUser.php.

References setPref().

Referenced by activateDeletionFlag(), and removeDeletionFlag().

1097  {
1098  self::_writePref($this->id, $a_keyword, $a_value);
1099  $this->setPref($a_keyword, $a_value);
1100  }
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 1190 of file class.ilObjUser.php.

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

Referenced by assignData().

1191  {
1192  global $DIC;
1193 
1194  $ilDB = $DIC['ilDB'];
1195 
1196  ilObjUser::_deleteAllPref($this->id);
1197  foreach ($this->prefs as $keyword => $value) {
1198  self::_writePref($this->id, $keyword, $value);
1199  }
1200  }
global $ilDB
$DIC
Definition: xapitoken.php:46
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: