ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 @access public. More...
 
 read ()
 loads a record "user" from database @access private More...
 
 getPasswordEncodingType ()
 
 setPasswordEncodingType ($password_encryption_type)
 
 getPasswordSalt ()
 
 setPasswordSalt ($password_salt)
 
 assignData ($a_data)
 loads a record "user" from array @access 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 @access public More...
 
 updateLogin ($a_login)
 update login name More...
 
 writePref ($a_keyword, $a_value)
 write userpref to user table @access private More...
 
 deletePref ($a_keyword)
 Deletes a userpref value of the user from the database @access public. More...
 
 writePrefs ()
 write all userprefs @access 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 @access private More...
 
 delete ()
 deletes a user @access 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 @access public More...
 
 setLogin ($a_str)
 set login / username @access public More...
 
 getLogin ()
 get login / username @access public More...
 
 setPasswd ($a_str, $a_type=IL_PASSWD_PLAIN)
 set password @access public More...
 
 getPasswd ()
 get password More...
 
 getPasswdType ()
 get password type More...
 
 setGender ($a_str)
 set gender @access public More...
 
 getGender ()
 get gender @access 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) @access 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) @access public More...
 
 setFirstname ($a_str)
 set firstname @access public More...
 
 getFirstname ()
 get firstname @access public More...
 
 setLastname ($a_str)
 set lastame @access public More...
 
 getLastname ()
 get lastname @access public More...
 
 setInstitution ($a_str)
 set institution @access public More...
 
 getInstitution ()
 get institution @access public More...
 
 setDepartment ($a_str)
 set department @access public More...
 
 getDepartment ()
 get department @access public More...
 
 setStreet ($a_str)
 set street @access public More...
 
 getStreet ()
 get street @access public More...
 
 setCity ($a_str)
 set city @access public More...
 
 getCity ()
 get city @access public More...
 
 setZipcode ($a_str)
 set zipcode @access public More...
 
 getZipcode ()
 get zipcode @access 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 @access public More...
 
 getPhoneOffice ()
 get office phone @access public More...
 
 setPhoneHome ($a_str)
 set home phone @access public More...
 
 getPhoneHome ()
 get home phone @access public More...
 
 setPhoneMobile ($a_str)
 set mobile phone @access public More...
 
 getPhoneMobile ()
 get mobile phone @access public More...
 
 setFax ($a_str)
 set fax @access public More...
 
 getFax ()
 get fax @access public More...
 
 setClientIP ($a_str)
 set client ip number @access public More...
 
 getClientIP ()
 get client ip number @access public More...
 
 setMatriculation ($a_str)
 set matriculation number @access public More...
 
 getMatriculation ()
 get matriculation number @access public More...
 
 setEmail ($a_str)
 set email @access public More...
 
 getEmail ()
 get email address @access public More...
 
 setHobby ($a_str)
 
 getHobby ()
 get hobby @access public More...
 
 setLanguage ($a_str)
 set user language @access public More...
 
 getLanguage ()
 returns a 2char-language-string @access public More...
 
 setDiskQuota ($a_disk_quota)
 
 getDiskQuota ()
 
 getPersonalWorkspaceDiskQuota ()
 
 setLastPasswordChangeTS ($a_last_password_change_ts)
 
 getLastPasswordChangeTS ()
 
 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 @access public More...
 
 getLastLogin ()
 returns last login date @access public More...
 
 setLastUpdate ($a_str)
 set last update of user data set @access public More...
 
 getLastUpdate ()
 
 setComment ($a_str)
 set referral comment @access public More...
 
 getComment ()
 get referral comment @access public More...
 
 setApproveDate ($a_str)
 set date the user account was activated null indicates that the user has not yet been activated @access public More...
 
 getApproveDate ()
 get the date when the user account was approved @access public More...
 
 getAgreeDate ()
 get the date when the user accepted the user agreement @access public More...
 
 setAgreeDate ($a_str)
 set date the user account was accepted by the user nullindicates that the user has not accepted his account @access public More...
 
 setActive ($a_active, $a_owner=0)
 set user active state and updates system fields appropriately @access public More...
 
 getActive ()
 get user active state @access 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 @access public More...
 
 getStoredActive ($a_id)
 get user active state More...
 
 setSkin ($a_str)
 set user skin (template set) @access 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)
 
 addDesktopItem ($a_item_id, $a_type, $a_par="")
 add an item to user's personal desktop More...
 
 setDesktopItemParameters ($a_item_id, $a_type, $a_par)
 set parameters of a desktop item entry More...
 
 dropDesktopItem ($a_item_id, $a_type)
 drop an item from user's personal desktop More...
 
 isDesktopItem ($a_item_id, $a_type)
 check wether an item is on the users desktop or not More...
 
 getDesktopItems ($a_types="")
 
 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 @access public More...
 
 getAuthMode ($a_auth_key=false)
 get auth mode @access 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...
 
 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_bookmarks, $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 @access 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 @access public More...
 
 setId ($a_id)
 set object id @access public More...
 
 setRefId ($a_id)
 set reference id @access public More...
 
 getRefId ()
 get reference id @access public More...
 
 getType ()
 get object type @access public More...
 
 setType ($a_type)
 set object type @access public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title @access public More...
 
 getUntranslatedTitle ()
 get untranslated object title @access 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...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date @access public More...
 
 getLastUpdateDate ()
 get last update date @access public More...
 
 getDiskUsage ()
 
 create ()
 create More...
 
 update ()
 update object in db More...
 
 MDUpdateListener ($a_element)
 Meta data update listener. More...
 
 createMetaData ()
 create meta data entry More...
 
 updateMetaData ()
 update meta data entry More...
 
 deleteMetaData ()
 delete meta data entry More...
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 setParentRolePermissions ($a_parent_ref)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object More...
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) @access public More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false)
 Clone object permissions, put in tree ... More...
 
 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 _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 _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 @access 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...
 
 getUserIdByEmail ($a_email)
 STATIC METHOD get the user_id 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 _addDesktopItem ($a_usr_id, $a_item_id, $a_type, $a_par="")
 add an item to user's personal desktop More...
 
static _dropDesktopItem ($a_usr_id, $a_item_id, $a_type)
 drop an item from user's personal desktop More...
 
static _removeItemFromDesktops ($a_id)
 removes object from all user's desktops @access public More...
 
static _isDesktopItem ($a_usr_id, $a_item_id, $a_type)
 check wether an item is on the users desktop or not More...
 
static preloadIsDesktopItem ($a_usr_id, $a_item_ids)
 Preload desktop item information. More...
 
static _lookupDesktopItems ($user_id, $a_types="")
 get all desktop items of user and specified type 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)
 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 _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 @access public @access 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)
 
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 _getAssociatedUsersOnline ($a_user_id, $a_no_anonymous=false)
 
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 ($period)
 get ids of all users that have been inactive for at least the given period 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 ()
 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 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 _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)
 only called in ilTree::saveSubTree More...
 
static setDeletedDates ($a_ref_ids)
 Set deleted date @global type $ilDB. 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@access public More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection. More...
 
static _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $a_obj_ids)
 Get long description data. More...
 
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns. More...
 
static fixMissingTitles ($a_type, array &$a_obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate ($a_id)
 Lookup creation date. More...
 
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course. More...
 

Data Fields

 $login
 all user related data in single vars @access 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
 
 $ilias
 
 $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
 
 $inactivation_date = null
 
 $org_units
 
 $interests_general
 
 $interests_help_offered
 
 $interests_help_looking
 

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)
 @global type $ilDB More...
 
static resetInactivationDate ($usrIds)
 @global type $ilDB More...
 

Private Attributes

 $is_self_registered = false
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor @access public.

Parameters
integeruser_id

Reimplemented from ilObject.

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

175 {
176 global $ilias,$ilDB;
177
178 // init variables
179 $this->ilias =& $ilias;
180 $this->db =& $ilDB;
181
182 $this->type = "usr";
183 parent::__construct($a_user_id, $a_call_by_reference);
184 $this->auth_mode = "default";
185 $this->passwd_type = IL_PASSWD_PLAIN;
186
187 // for gender selection. don't change this
188 /*$this->gender = array(
189 'm' => "salutation_m",
190 'f' => "salutation_f"
191 );*/
192 if ($a_user_id > 0)
193 {
194 $this->setId($a_user_id);
195 $this->read();
196 }
197 else
198 {
199 // TODO: all code in else-structure doesn't belongs in class user !!!
200 //load default data
201 $this->prefs = array();
202 //language
203 $this->prefs["language"] = $this->ilias->ini->readVariable("language","default");
204
205 //skin and pda support
206 $this->skin = $this->ilias->ini->readVariable("layout","skin");
207
208 $this->prefs["skin"] = $this->skin;
209// $this->prefs["show_users_online"] = "y";
210
211 //style (css)
212 $this->prefs["style"] = $this->ilias->ini->readVariable("layout","style");
213 }
214 }
const IL_PASSWD_PLAIN
read()
loads a record "user" from database @access private
setId($a_id)
set object id @access public
redirection script todo: (a better solution should control the processing via a xml file)
global $ilDB

References $ilDB, $ilias, $skin, IL_PASSWD_PLAIN, read(), and ilObject\setId().

+ Here is the call graph for this function:

Member Function Documentation

◆ _addDesktopItem()

static ilObjUser::_addDesktopItem (   $a_usr_id,
  $a_item_id,
  $a_type,
  $a_par = "" 
)
static

add an item to user's personal desktop

Parameters
int$a_usr_idid of user object
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 2991 of file class.ilObjUser.php.

2992 {
2993 global $ilDB;
2994
2995 $item_set = $ilDB->queryF("SELECT * FROM desktop_item WHERE ".
2996 "item_id = %s AND type = %s AND user_id = %s",
2997 array("integer", "text", "integer"),
2998 array($a_item_id, $a_type, $a_usr_id));
2999
3000 // only insert if item is not already on desktop
3001 if (!$ilDB->fetchAssoc($item_set))
3002 {
3003 $ilDB->manipulateF("INSERT INTO desktop_item (item_id, type, user_id, parameters) VALUES ".
3004 " (%s,%s,%s,%s)", array("integer", "text", "integer", "text"),
3005 array($a_item_id,$a_type,$a_usr_id,$a_par));
3006 }
3007
3008 include_once './Services/Calendar/classes/class.ilCalendarCategories.php';
3010 }
static deletePDItemsCache($a_usr_id)
Delete cache (add remove desktop item)
$a_type
Definition: workflow.php:93

References $a_type, $ilDB, and ilCalendarCategories\deletePDItemsCache().

Referenced by addDesktopItem(), ilRbacAdmin\addDesktopItem(), ilParticipant\addDesktopItem(), ilParticipants\addDesktopItem(), ilDesktopItemGUI\addToDesktop(), ilAccountCode\applyRoleAssignments(), ilUserImportParser\assignToRole(), ilECSEnrolmentStatusCommandQueueHandler\doUpdate(), and ilObjSurvey\inviteUser().

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

◆ _checkExternalAuthAccount()

static ilObjUser::_checkExternalAuthAccount (   $a_auth,
  $a_account 
)
static

check whether external account and authentication method matches with a user

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

3722 {
3723 global $ilDB,$ilSetting;
3724
3725 // Check directly with auth_mode
3726 $r = $ilDB->queryF("SELECT * FROM usr_data WHERE ".
3727 " ext_account = %s AND auth_mode = %s",
3728 array("text", "text"),
3729 array($a_account, $a_auth));
3730 if ($usr = $ilDB->fetchAssoc($r))
3731 {
3732 return $usr["login"];
3733 }
3734
3735 // For compatibility, check for login (no ext_account entry given)
3736 $res = $ilDB->queryF("SELECT login FROM usr_data ".
3737 "WHERE login = %s AND auth_mode = %s AND ext_account IS NULL ",
3738 array("text", "text"),
3739 array($a_account, $a_auth));
3740 if($usr = $ilDB->fetchAssoc($res))
3741 {
3742 return $usr['login'];
3743 }
3744
3745 // If auth_default == $a_auth => check for login
3746 if(ilAuthUtils::_getAuthModeName($ilSetting->get('auth_mode')) == $a_auth)
3747 {
3748 $res = $ilDB->queryF("SELECT login FROM usr_data WHERE ".
3749 " ext_account = %s AND auth_mode = %s",
3750 array("text", "text"),
3751 array($a_account, "default"));
3752 if ($usr = $ilDB->fetchAssoc($res))
3753 {
3754 return $usr["login"];
3755 }
3756 // Search for login (no ext_account given)
3757 $res = $ilDB->queryF("SELECT login FROM usr_data ".
3758 "WHERE login = %s AND (ext_account IS NULL OR ext_account = '') AND auth_mode = %s",
3759 array("text", "text"),
3760 array($a_account, "default"));
3761 if($usr = $ilDB->fetchAssoc($res))
3762 {
3763 return $usr["login"];
3764 }
3765 }
3766 return false;
3767 }
static _getAuthModeName($a_auth_key)
$r
Definition: example_031.php:79
global $ilSetting
Definition: privfeed.php:17

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

Referenced by ilSoapAuthentication\__checkAgreement(), ilSoapAuthenticationCAS\authenticate(), ilAuthProviderApache\doAuthentication(), ilAuthProviderCAS\doAuthentication(), ilAuthProviderRadius\doAuthentication(), ilAuthContainerLDAP\extractUserName(), ilAuthContainerSOAP\fetchData(), ilUserImportParser\importEndTag(), ilCASAuth\login(), ilAuthContainerCAS\loginObserver(), ilAuthContainerRadius\loginObserver(), ilLDAPUserSynchronisation\readInternalAccount(), ilLDAPQuery\readUserData(), ilECSCmsCourseMemberCommandQueueHandler\refreshAssignmentStatus(), ilObjUserTest\testAuthAndEmailMethods(), ilAuthContainerApache\updateRequired(), ilAuthContainerLDAP\updateRequired(), and ilUserImportParser\verifyEndTag().

+ 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 @access public.

Parameters
stringkeyword

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

1059 {
1060 global $ilDB;
1061
1062 $ilDB->manipulateF("DELETE FROM usr_pref WHERE usr_id = %s",
1063 array("integer"), array($a_user_id));
1064 }

References $ilDB.

Referenced by delete(), and writePrefs().

+ Here is the caller graph for this function:

◆ _doesLoginnameExistInHistory()

static ilObjUser::_doesLoginnameExistInHistory (   $a_login)
static

Checks wether the passed loginname already exists in history.

@access public

Parameters
string$a_loginLoginname
Returns
boolean true or false

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

891 {
892 global $ilDB;
893
894 $res = $ilDB->queryF('
895 SELECT * FROM loginname_history
896 WHERE login = %s',
897 array('text'), array($a_login));
898
899 return $ilDB->fetchAssoc($res) ? true : false;
900 }

References $ilDB, and $res.

Referenced by ilAccountRegistrationGUI\saveForm().

+ Here is the caller graph for this function:

◆ _dropDesktopItem()

static ilObjUser::_dropDesktopItem (   $a_usr_id,
  $a_item_id,
  $a_type 
)
static

drop an item from user's personal desktop

Parameters
int$a_usr_idid of user object
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 3052 of file class.ilObjUser.php.

3053 {
3054 global $ilDB;
3055
3056 $ilDB->manipulateF("DELETE FROM desktop_item WHERE ".
3057 " item_id = %s AND type = %s AND user_id = %s",
3058 array("integer", "text", "integer"),
3059 array($a_item_id, $a_type, $a_usr_id));
3060
3061 include_once './Services/Calendar/classes/class.ilCalendarCategories.php';
3063 }

References $a_type, $ilDB, and ilCalendarCategories\deletePDItemsCache().

Referenced by ilPDSelectedItemsBlockGUI\confirmedRemove(), ilUserImportParser\detachFromRole(), ilObjSurvey\disinviteUser(), ilECSEnrolmentStatusCommandQueueHandler\doUpdate(), dropDesktopItem(), ilParticipant\dropDesktopItem(), ilParticipants\dropDesktopItem(), and ilDesktopItemGUI\removeFromDesktop().

+ Here is the call graph for this function:
+ 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.

@access public

Parameters
stringexternal account
stringauth mode

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

4417 {
4418 global $ilDB;
4419
4420 $res = $ilDB->queryF("SELECT * FROM usr_data ".
4421 "WHERE ext_account = %s AND auth_mode = %s",
4422 array("text", "text"),
4423 array($a_external_account, $a_auth_mode));
4424 return $ilDB->fetchAssoc($res) ? true :false;
4425 }

References $ilDB, and $res.

Referenced by ilObjUserTest\testAuthAndEmailMethods().

+ 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 4956 of file class.ilObjUser.php.

4957 {
4958 global $ilDB;
4959
4960 do
4961 {
4962 $continue = false;
4963
4964 $hashcode = substr(md5(uniqid(rand(), true)), 0, 16);
4965
4966 $res = $ilDB->queryf('
4967 SELECT COUNT(usr_id) cnt FROM usr_data
4968 WHERE reg_hash = %s',
4969 array('text'),
4970 array($hashcode));
4971 while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
4972 {
4973 if($row->cnt > 0) $continue = true;
4974 break;
4975 }
4976
4977 if($continue) continue;
4978
4979 $ilDB->manipulateF('
4980 UPDATE usr_data
4981 SET reg_hash = %s
4982 WHERE usr_id = %s',
4983 array('text', 'integer'),
4984 array($hashcode, (int)$a_usr_id)
4985 );
4986
4987 break;
4988
4989 } while(true);
4990
4991 return $hashcode;
4992 }

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

◆ _getAllUserAssignedStyles()

static ilObjUser::_getAllUserAssignedStyles ( )
static

skins and styles

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

2939 {
2940 global $ilDB;
2941
2942 $q = "SELECT DISTINCT up1.value style, up2.value skin FROM usr_pref up1, usr_pref up2 ".
2943 " WHERE up1.keyword = ".$ilDB->quote("style", "text").
2944 " AND up2.keyword = ".$ilDB->quote("skin", "text").
2945 " AND up1.usr_id = up2.usr_id";
2946
2947 $sty_set = $ilDB->query($q);
2948
2949 $styles = array();
2950 while($sty_rec = $ilDB->fetchAssoc($sty_set))
2951 {
2952 $styles[] = $sty_rec["skin"].":".$sty_rec["style"];
2953 }
2954
2955 return $styles;
2956 }

References $ilDB, and $styles.

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

+ 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 @access public

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

2806 {
2807 global $ilDB;
2808
2809 $result_arr = array();
2810 $types = array();
2811 $values = array();
2812
2813 if ($a_fields !== NULL and is_array($a_fields))
2814 {
2815 if (count($a_fields) == 0)
2816 {
2817 $select = "*";
2818 }
2819 else
2820 {
2821 if (($usr_id_field = array_search("usr_id",$a_fields)) !== false)
2822 unset($a_fields[$usr_id_field]);
2823
2824 $select = implode(",",$a_fields).",usr_data.usr_id";
2825 // online time
2826 if(in_array('online_time',$a_fields))
2827 {
2828 $select .= ",ut_online.online_time ";
2829 }
2830 }
2831
2832 $q = "SELECT ".$select." FROM usr_data ";
2833
2834 // Add online_time if desired
2835 // Need left join here to show users that never logged in
2836 if(in_array('online_time',$a_fields))
2837 {
2838 $q .= "LEFT JOIN ut_online ON usr_data.usr_id = ut_online.usr_id ";
2839 }
2840
2841 switch ($active)
2842 {
2843 case 0:
2844 case 1:
2845 $q .= "WHERE active = ".$ilDB->quote($active, "integer");
2846 break;
2847 case 2:
2848 $q .= "WHERE time_limit_unlimited= ".$ilDB->quote(0, "integer");;
2849 break;
2850 case 3:
2851 $qtemp = $q . ", rbac_ua, object_data WHERE rbac_ua.rol_id = object_data.obj_id AND ".
2852 $ilDB->like("object_data.title", "text", "%crs%")." AND usr_data.usr_id = rbac_ua.usr_id";
2853 $r = $ilDB->query($qtemp);
2854 $course_users = array();
2855 while ($row = $ilDB->fetchAssoc($r))
2856 {
2857 array_push($course_users, $row["usr_id"]);
2858 }
2859 if (count($course_users))
2860 {
2861 $q .= " WHERE ".$ilDB->in("usr_data.usr_id", $course_users, true, "integer")." ";
2862 }
2863 else
2864 {
2865 return $result_arr;
2866 }
2867 break;
2868 case 4:
2869 $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"]));
2870 $q.= " AND last_login < ".$ilDB->quote($date, "timestamp");
2871 break;
2872 case 5:
2873 $ref_id = $_SESSION["user_filter_data"];
2874 if ($ref_id)
2875 {
2876 $q .= " LEFT JOIN obj_members ON usr_data.usr_id = obj_members.usr_id ".
2877 "WHERE obj_members.obj_id = (SELECT obj_id FROM object_reference ".
2878 "WHERE ref_id = ".$ilDB->quote($ref_id, "integer").") ";
2879 }
2880 break;
2881 case 6:
2882 global $rbacreview;
2883 $ref_id = $_SESSION["user_filter_data"];
2884 if ($ref_id)
2885 {
2886 $local_roles = $rbacreview->getRolesOfRoleFolder($ref_id,false);
2887 if (is_array($local_roles) && count($local_roles))
2888 {
2889 $q.= " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE ".
2890 $ilDB->in("rbac_ua.rol_id", $local_roles, false, "integer")." ";
2891 }
2892 }
2893 break;
2894 case 7:
2895 $rol_id = $_SESSION["user_filter_data"];
2896 if ($rol_id)
2897 {
2898 $q .= " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE rbac_ua.rol_id = ".
2899 $ilDB->quote($rol_id, "integer");
2900 }
2901 break;
2902 }
2903 $r = $ilDB->query($q);
2904
2905 while ($row = $ilDB->fetchAssoc($r))
2906 {
2907 $result_arr[] = $row;
2908 }
2909 }
2910
2911 return $result_arr;
2912 }
$_SESSION["AccountId"]

References $_SESSION, $active, $ilDB, $r, ilObject\$ref_id, and $row.

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

+ Here is the caller graph for this function:

◆ _getAssociatedUsersOnline()

static ilObjUser::_getAssociatedUsersOnline (   $a_user_id,
  $a_no_anonymous = false 
)
static
reads all active sessions from db and returns users that are online
and who have a local role in a group or a course for which the

the current user has also a local role.

@param      integer user_id User ID of the current user.
@return     array
@deprecated This is dead code since ILIAS 5.3.x (ilUsersOnlineBlock ...) and could be removed in future releases.

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

4862 {
4863 global $ilias, $ilDB;
4864
4865 $pd_set = new ilSetting("pd");
4866 $atime = $pd_set->get("user_activity_time") * 60;
4867 $ctime = time();
4868 $no_anonym = ($a_no_anonymous)
4869 ? "AND user_id <> ".$ilDB->quote(ANONYMOUS_USER_ID, "integer")." "
4870 : "";
4871
4872 // Get a list of object id's of all courses and groups for which
4873 // the current user has local roles.
4874 // Note: we have to use DISTINCT here, because a user may assume
4875 // multiple roles in a group or a course.
4876 $q = "SELECT DISTINCT dat.obj_id as obj_id ".
4877 "FROM rbac_ua ua ".
4878 "JOIN rbac_fa fa ON fa.rol_id = ua.rol_id ".
4879 "JOIN object_reference r1 ON r1.ref_id = fa.parent ".
4880 "JOIN tree ON tree.child = r1.ref_id ".
4881 "JOIN object_reference r2 ON r2.ref_id = tree.child ". // #17674 - rolf is gone
4882 "JOIN object_data dat ON dat.obj_id = r2.obj_id ".
4883 "WHERE ua.usr_id = ".$ilDB->quote($a_user_id, "integer")." ".
4884 "AND fa.assign = ".$ilDB->quote("y", "text")." ".
4885 "AND dat.type IN (".$ilDB->quote("crs", "text").",".
4886 $ilDB->quote("grp", "text").")";
4887 $r = $ilDB->query($q);
4888
4889 while ($row = $ilDB->fetchAssoc($r))
4890 {
4891 $groups_and_courses_of_user[] = $row["obj_id"];
4892 }
4893
4894 require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
4895 $tos_condition = '';
4897 {
4898 $tos_condition = " AND (agree_date IS NOT NULL OR ud.usr_id = " . $ilDB->quote(SYSTEM_USER_ID, 'integer') . ") ";
4899 }
4900
4901 // If the user is not in a course or a group, he has no associated users.
4902 if (count($groups_and_courses_of_user) == 0)
4903 {
4904 $q = "SELECT count(user_id) as num,ctime,user_id,firstname,lastname,title,login,last_login ".
4905 "FROM usr_session ".
4906 "JOIN usr_data ud ON user_id = ud.usr_id ".
4907 "WHERE user_id = ".$ilDB->quote($a_user_id, "integer")." ".
4908 $no_anonym.
4909 $tos_condition.
4910 "AND expires > ".$ilDB->quote(time(), "integer")." ".
4911 "GROUP BY user_id,ctime,firstname,lastname,title,login,last_login";
4912 $r = $ilDB->query($q);
4913 }
4914 else
4915 {
4916 $q = "SELECT count(user_id) as num,s.ctime,s.user_id,ud.firstname,ud.lastname,ud.title,ud.login,ud.last_login ".
4917 "FROM usr_session s ".
4918 "JOIN usr_data ud ON ud.usr_id = s.user_id ".
4919 "JOIN rbac_ua ua ON ua.usr_id = s.user_id ".
4920 "JOIN rbac_fa fa ON fa.rol_id = ua.rol_id ".
4921 "JOIN tree ON tree.child = fa.parent ".
4922 "JOIN object_reference or1 ON or1.ref_id = tree.child ". // #17674 - rolf is gone
4923 "JOIN object_data od ON od.obj_id = or1.obj_id ".
4924 "LEFT JOIN usr_pref p ON (p.usr_id = ud.usr_id AND p.keyword = ".
4925 $ilDB->quote("hide_own_online_status", "text").") ".
4926 "WHERE s.user_id != 0 ".
4927 $no_anonym.
4928 "AND (p.value IS NULL OR NOT p.value = ".$ilDB->quote("y", "text").") ".
4929 "AND s.expires > ".$ilDB->quote(time(),"integer")." ".
4930 "AND fa.assign = ".$ilDB->quote("y", "text")." ".
4931 $tos_condition.
4932 "AND ".$ilDB->in("od.obj_id", $groups_and_courses_of_user, false, "integer")." ".
4933 "GROUP BY s.user_id,s.ctime,ud.firstname,ud.lastname,ud.title,ud.login,ud.last_login ".
4934 "ORDER BY ud.lastname, ud.firstname";
4935 $r = $ilDB->query($q);
4936 }
4937
4938 while ($user = $ilDB->fetchAssoc($r))
4939 {
4940 if ($atime <= 0
4941 || $user["ctime"] + $atime > $ctime)
4942 {
4943 $users[$user["user_id"]] = $user;
4944 }
4945 }
4946
4947 return $users ? $users : array();
4948 }
ILIAS Setting Class.

References $ilDB, $ilias, $r, $row, and ilTermsOfServiceHelper\isEnabled().

Referenced by ilUtil\getAssociatedUsersOnline().

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

◆ _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.

@access public

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

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

3629 {
3630 global $ilDB,$ilSetting;
3631
3632 include_once('./Services/Authentication/classes/class.ilAuthUtils.php');
3633 $q = "SELECT login,usr_id,ext_account,auth_mode FROM usr_data ".
3634 "WHERE auth_mode = %s";
3635 $types[] = "text";
3636 $values[] = $a_auth_mode;
3637 if($a_read_auth_default and ilAuthUtils::_getAuthModeName($ilSetting->get('auth_mode',AUTH_LOCAL)) == $a_auth_mode)
3638 {
3639 $q.= " OR auth_mode = %s ";
3640 $types[] = "text";
3641 $values[] = 'default';
3642 }
3643
3644 $res = $ilDB->queryF($q, $types, $values);
3645 while ($row = $ilDB->fetchObject($res))
3646 {
3647 if($row->auth_mode == 'default')
3648 {
3649 $accounts[$row->usr_id] = $row->login;
3650 }
3651 else
3652 {
3653 $accounts[$row->usr_id] = $row->ext_account;
3654 }
3655 }
3656 return $accounts ? $accounts : array();
3657 }
const AUTH_LOCAL

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

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

+ 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 4348 of file class.ilObjUser.php.

4349 {
4350 global $ilDB;
4351
4352 if ($a_user_id > 0)
4353 {
4354 return ilObjUser::_lookupPref($a_user_id, "priv_feed_pass");
4355 }
4356 return false;
4357 }
static _lookupPref($a_usr_id, $a_keyword)

References $ilDB, and _lookupPref().

+ Here is the call graph for this function:

◆ _getImportedUserId()

static ilObjUser::_getImportedUserId (   $i2_id)
static

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

3535 {
3536 global $ilDB;
3537
3538 $query = "SELECT obj_id FROM object_data WHERE import_id = ".
3539 $ilDB->quote($i2_id, "text");
3540
3541 $res = $ilDB->query($query);
3542 while($row = $ilDB->fetchObject($res))
3543 {
3544 $id = $row->obj_id;
3545 }
3546 return $id ? $id : 0;
3547 }

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

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

+ 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.

@access 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 914 of file class.ilObjUser.php.

915 {
916 global $ilDB;
917
918 $ilDB->setLimit(1, 0);
919 $res = $ilDB->queryF('
920 SELECT login, history_date FROM loginname_history
921 WHERE usr_id = %s ORDER BY history_date DESC',
922 array('integer'), array($a_usr_id));
923 $row = $ilDB->fetchAssoc($res);
924 if(!is_array($row) || !count($row)) throw new ilUserException('');
925
926 return array(
927 $row['login'], $row['history_date']
928 );
929 }
Class for user related exception handling in ILIAS.

References $ilDB, $res, and $row.

Referenced by updateLogin().

+ 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 3792 of file class.ilObjUser.php.

3793 {
3794 global $ilDB, $ilSetting;
3795
3796 // default set to local (1)?
3797
3798 $q = "SELECT * FROM usr_data WHERE ".
3799 " email = %s AND (auth_mode = %s ";
3800 $types = array("text", "text");
3801 $values = array($a_email, "local");
3802
3803 if ($ilSetting->get("auth_mode") == 1)
3804 {
3805 $q.=" OR auth_mode = %s";
3806 $types[] = "text";
3807 $values[] = "default";
3808 }
3809
3810 $q.= ")";
3811
3812 $users = array();
3813 $usr_set = $ilDB->queryF($q, $types, $values);
3814 while ($usr_rec = $ilDB->fetchAssoc($usr_set))
3815 {
3816 $users[$usr_rec["usr_id"]] = $usr_rec["login"];
3817 }
3818
3819 return $users;
3820 }

References $ilDB, and $ilSetting.

Referenced by ilStartUpGUI\showUserMappingSelection(), and ilObjUserTest\testAuthAndEmailMethods().

+ Here is the caller graph for this function:

◆ _getLoginAttempts()

static ilObjUser::_getLoginAttempts (   $a_usr_id)
static

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

4682 {
4683 global $ilDB;
4684
4685 $query = "SELECT login_attempts FROM usr_data WHERE usr_id = %s";
4686 $result = $ilDB->queryF( $query, array('integer'), array($a_usr_id) );
4687 $record = $ilDB->fetchAssoc( $result );
4688 $login_attempts = $record['login_attempts'];
4689
4690 return $login_attempts;
4691 }
$result

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

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

+ Here is the caller graph for this function:

◆ _getNumberOfUsersForStyle()

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

skins and styles

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

2918 {
2919 global $ilDB;
2920
2921 $q = "SELECT count(*) as cnt FROM usr_pref up1, usr_pref up2 ".
2922 " WHERE up1.keyword= ".$ilDB->quote("style", "text").
2923 " AND up1.value= ".$ilDB->quote($a_style, "text").
2924 " AND up2.keyword= ".$ilDB->quote("skin", "text").
2925 " AND up2.value= ".$ilDB->quote($a_skin, "text").
2926 " AND up1.usr_id = up2.usr_id ";
2927
2928 $cnt_set = $ilDB->query($q);
2929
2930 $cnt_rec = $ilDB->fetchAssoc($cnt_set);
2931
2932 return $cnt_rec["cnt"];
2933 }

References $ilDB.

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

+ Here is the caller graph for this function:

◆ _getNumberOfUsersPerAuthMode()

static ilObjUser::_getNumberOfUsersPerAuthMode ( )
static

get number of users per auth mode

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

3773 {
3774 global $ilDB;
3775
3776 $r = $ilDB->query("SELECT count(*) AS cnt, auth_mode FROM usr_data ".
3777 "GROUP BY auth_mode");
3778 $cnt_arr = array();
3779 while($cnt = $ilDB->fetchAssoc($r))
3780 {
3781 $cnt_arr[$cnt["auth_mode"]] = $cnt["cnt"];
3782 }
3783
3784 return $cnt_arr;
3785 }

References $ilDB, and $r.

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

+ 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

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

3889 {
3890 global $ilDB;
3891
3892 // BEGIN DiskQuota: Fetch all user preferences in a single query
3893 $res = $ilDB->queryF("SELECT * FROM usr_pref WHERE ".
3894 "keyword IN (%s,%s) ".
3895 "AND usr_id = %s",
3896 array("text", "text", "integer"),
3897 array('public_upload', 'public_profile', $a_usr_id));
3898 while ($row = $ilDB->fetchAssoc($res))
3899 {
3900 switch ($row['keyword'])
3901 {
3902 case 'public_upload' :
3903 $upload = $row['value'] == 'y';
3904 break;
3905 case 'public_profile' :
3906 $profile = ($row['value'] == 'y' ||
3907 $row['value'] == 'g');
3908 break;
3909 }
3910 }
3911
3912 // END DiskQuota: Fetch all user preferences in a single query
3913 $webspace_dir = "";
3914 if(defined('ILIAS_MODULE'))
3915 {
3916 $webspace_dir = ('.'.$webspace_dir);
3917 }
3918 $webspace_dir .= ('./'.ltrim(ilUtil::getWebspaceDir(), "./"));
3919
3920 $image_dir = $webspace_dir."/usr_images";
3921 // BEGIN DiskQuota: Support 'big' user images
3922 if ($a_size == 'big')
3923 {
3924 $thumb_file = $image_dir."/usr_".$a_usr_id.".jpg";
3925 }
3926 else
3927 {
3928 $thumb_file = $image_dir."/usr_".$a_usr_id."_".$a_size.".jpg";
3929 }
3930 // END DiskQuota: Support 'big' user images
3931
3932 if((($upload && $profile) || $a_force_pic)
3933 && @is_file($thumb_file))
3934 {
3935 $file = $thumb_file."?t=".rand(1, 99999);
3936 }
3937 else
3938 {
3939 if (!$a_prevent_no_photo_image)
3940 {
3941 // we only have xsmall and xxsmall for this
3942 if($a_size == "small" || $a_size == "big")
3943 {
3944 $a_size = "xsmall";
3945 }
3946 $file = ilUtil::getImagePath("no_photo_".$a_size.".jpg");
3947 }
3948 }
3949
3950 require_once('./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
3952 }
static getWebspaceDir($mode="filesystem")
get webspace directory
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static signFile($path_to_file)
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file

References $file, $ilDB, $res, $row, defined, ilUtil\getImagePath(), ilUtil\getWebspaceDir(), and ilWACSignedPath\signFile().

Referenced by ilUserProfile\addStandardFieldsToForm(), ilObjBlogGUI\buildExportFile(), ilPortfolioHTMLExport\buildExportFile(), ilUserProfileBadge\evaluate(), ilWikiContributorsTableGUI\fillRow(), ilUsersOnlineBlockGUI\fillRow(), ilAwarenessData\getData(), ilPublicUserProfileGUI\getEmbeddable(), ilUserUtil\getNamePresentation(), ilNoteGUI\getNoteListHTML(), getPersonalPicturePath(), ilUserDataSet\getXmlRecord(), ilNewsTimelineItemGUI\render(), ilObjPortfolioBaseGUI\renderFullscreenHeader(), ilObjBlogGUI\renderFullscreenHeader(), ilPublicUserProfileGUI\renderTitle(), and ilPersonalProfileGUI\showPublicProfileFields().

+ 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 4626 of file class.ilObjUser.php.

4627 {
4628 global $ilDB;
4629
4630 $prefs = array();
4631
4632 $r = $ilDB->queryF("SELECT * FROM usr_pref WHERE usr_id = %s",
4633 array("integer"), array($user_id));
4634
4635 while($row = $ilDB->fetchAssoc($r))
4636 {
4637 $prefs[$row["keyword"]] = $row["value"];
4638 }
4639
4640 return $prefs;
4641 }

References $ilDB, $prefs, $r, and $row.

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

+ 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 4578 of file class.ilObjUser.php.

4578 {
4579 global $ilDB;
4580
4581 $ids = array();
4582 if (is_array($a_internalids)) {
4583 foreach ($a_internalids as $internalid) {
4584 if (is_numeric ($internalid))
4585 {
4586 $ids[] = $internalid;
4587 }
4588 else
4589 {
4590 $parsedid = ilUtil::__extractId($internalid, IL_INST_ID);
4591 if (is_numeric($parsedid) && $parsedid > 0)
4592 {
4593 $ids[] = $parsedid;
4594 }
4595 }
4596 }
4597 }
4598 if (count($ids) == 0)
4599 $ids [] = -1;
4600
4601 $query = "SELECT usr_data.*, usr_pref.value AS language
4602 FROM usr_data
4603 LEFT JOIN usr_pref
4604 ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
4605 WHERE ".$ilDB->in("usr_data.usr_id", $ids, false, "integer");
4606 $values[] = "language";
4607 $types[] = "text";
4608
4609 $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4610
4611 $data = array();
4612 $result = $ilDB->queryF($query, $types, $values);
4613 while ($row = $ilDB->fetchAssoc($result))
4614 {
4615 $data[] = $row;
4616 }
4617 return $data;
4618 }
static __extractId($ilias_id, $inst_id)
extract ref id from role title, e.g.

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

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

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

◆ _getUserIdsByEmail()

static ilObjUser::_getUserIdsByEmail (   $a_email)
static

STATIC METHOD get all user_ids of an email address.

Parameters
stringemail of user
Returns
integer id of user

@access public

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

2570 {
2571 global $ilias, $ilDB;
2572
2573 $res = $ilDB->queryF("SELECT login FROM usr_data ".
2574 "WHERE email = %s and active = 1",
2575 array("text"),
2576 array($a_email));
2577 $ids = array ();
2578 while($row = $ilDB->fetchObject($res))
2579 {
2580 $ids[] = $row->login;
2581 }
2582
2583 return $ids;
2584 }

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

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

+ 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 @access public

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

5094 {
5096 $field = 'inactivation_date';
5098
5099 if( !(int)$period ) throw new ilException('no valid period given');
5100
5101 global $ilDB;
5102
5103 $date = date( 'Y-m-d H:i:s', (time() - ((int)$period * 24 * 60 * 60)) );
5104
5105 $query = "SELECT usr_id FROM usr_data WHERE $field < %s AND active = %s";
5106
5107 $res = $ilDB->queryF($query, array('timestamp', 'integer'), array($date, 0));
5108
5109 $ids = array();
5110 while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
5111 {
5112 $ids[] = $row->usr_id;
5113 }
5114
5115 return $ids;
5116 }
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
Base class for ILIAS Exception handling.

References $ilDB, $query, $res, $row, date, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilCronDeleteInactivatedUserAccounts\run().

+ Here is the caller graph for this function:

◆ _getUserIdsByInactivityPeriod()

static ilObjUser::_getUserIdsByInactivityPeriod (   $period)
static

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

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

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

5065 {
5066 if( !(int)$period ) throw new ilException('no valid period given');
5067
5068 global $ilDB;
5069
5070 $date = date( 'Y-m-d H:i:s', (time() - ((int)$period * 24 * 60 * 60)) );
5071
5072 $query = "SELECT usr_id FROM usr_data WHERE last_login < %s OR (ISNULL(last_login) AND create_date < %s)";
5073
5074 $res = $ilDB->queryF($query, array('timestamp', 'timestamp'), array($date, $date));
5075
5076 $ids = array();
5077 while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
5078 {
5079 $ids[] = $row->usr_id;
5080 }
5081
5082 return $ids;
5083 }

References $ilDB, $query, $res, $row, date, and ilDBConstants\FETCHMODE_OBJECT.

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

3500 {
3501 global $ilDB;
3502
3503 $q = "SELECT DISTINCT user_id FROM personal_clipboard WHERE ".
3504 "item_id = ".$ilDB->quote($a_id, "integer")." AND ".
3505 "type = ".$ilDB->quote($a_type, "text");
3506 $user_set = $ilDB->query($q);
3507 $users = array();
3508 while ($user_rec = $ilDB->fetchAssoc($user_set))
3509 {
3510 $users[] = $user_rec["user_id"];
3511 }
3512
3513 return $users;
3514 }

References $a_type, and $ilDB.

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

+ 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 4477 of file class.ilObjUser.php.

4477 {
4478 global $ilDB;
4479 $data = array();
4480 $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 ";
4481 $types[] = "text";
4482 $values[] = "language";
4483
4484 if (is_numeric($active) && $active > -1)
4485 {
4486 $query .= " AND usr_data.active = %s";
4487 $values[] = $active;
4488 $types[] = "integer";
4489 }
4490
4491 if ($ref_id != USER_FOLDER_ID)
4492 {
4493 $query.= " AND usr_data.time_limit_owner = %s";
4494 $values[] = $ref_id;
4495 $types[] = "integer";
4496 }
4497
4498 $query .= " AND usr_data.usr_id != %s ";
4499 $values[] = ANONYMOUS_USER_ID;
4500 $types[] = "integer";
4501
4502 $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4503
4504 $result = $ilDB->queryF($query, $types, $values);
4505 $data = array();
4506 while ($row = $ilDB->fetchAssoc($result))
4507 {
4508 array_push($data, $row);
4509 }
4510
4511 return $data;
4512 }
const USER_FOLDER_ID
Class ilObjUserFolder.

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

Referenced by ilSoapUserAdministration\getUsersForContainer().

+ 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 4520 of file class.ilObjUser.php.

4521 {
4522 return ilObjUser::_getUsersForIds($a_mem_ids, $active);
4523 }
static _getUsersForIds($a_mem_ids, $active=-1, $timelimitowner=-1)
return user data for given user id

References $active, and _getUsersForIds().

Referenced by ilSoapUserAdministration\getUsersForContainer().

+ 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 4531 of file class.ilObjUser.php.

4532 {
4533 global $rbacadmin, $rbacreview, $ilDB;
4534
4535 $query = "SELECT usr_data.*, usr_pref.value AS language
4536 FROM usr_data
4537 LEFT JOIN usr_pref ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
4538 WHERE ".$ilDB->in("usr_data.usr_id", $a_mem_ids, false, "integer")."
4539 AND usr_data.usr_id != %s";
4540 $values[] = "language";
4541 $types[] = "text";
4542 $values[] = ANONYMOUS_USER_ID;
4543 $types[] = "integer";
4544
4545 if (is_numeric($active) && $active > -1)
4546 {
4547 $query .= " AND active = %s";
4548 $values[] = $active;
4549 $types[] = "integer";
4550 }
4551
4552 if ($timelimitowner != USER_FOLDER_ID && $timelimitowner != -1)
4553 {
4554 $query.= " AND usr_data.time_limit_owner = %s";
4555 $values[] = $timelimitowner;
4556 $types[] = "integer";
4557
4558 }
4559
4560 $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4561
4562 $result = $ilDB->queryF($query, $types, $values);
4563 while ($row = $ilDB->fetchAssoc($result))
4564 {
4565 $mem_arr[] = $row;
4566 }
4567
4568 return $mem_arr ? $mem_arr : array();
4569 }

References $active, $ilDB, $query, $result, $row, and USER_FOLDER_ID.

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

+ 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 4434 of file class.ilObjUser.php.

4434 {
4435 global $ilDB, $rbacreview;
4436 $data = array();
4437
4438 $ids = $rbacreview->assignedUsers($role_id);
4439
4440 if (count ($ids) == 0)
4441 {
4442 $ids = array (-1);
4443 }
4444
4445 $query = "SELECT usr_data.*, usr_pref.value AS language
4446 FROM usr_data
4447 LEFT JOIN usr_pref ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
4448 WHERE ".$ilDB->in("usr_data.usr_id", $ids, false, "integer");
4449 $values[] = "language";
4450 $types[] = "text";
4451
4452
4453 if (is_numeric($active) && $active > -1)
4454 {
4455 $query .= " AND usr_data.active = %s";
4456 $values[] = $active;
4457 $types[] = "integer";
4458 }
4459
4460 $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4461
4462 $r = $ilDB->queryF($query, $types, $values);
4463 $data = array();
4464 while ($row = $ilDB->fetchAssoc($r))
4465 {
4466 $data[] = $row;
4467 }
4468 return $data;
4469 }

References $active, $data, $ilDB, $query, $r, and $row.

Referenced by ilSoapUserAdministration\getUserForRole().

+ Here is the caller graph for this function:

◆ _incrementLoginAttempts()

static ilObjUser::_incrementLoginAttempts (   $a_usr_id)
static

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

4694 {
4695 global $ilDB;
4696
4697 $query = "UPDATE usr_data SET login_attempts = (login_attempts + 1) WHERE usr_id = %s";
4698 $affected = $ilDB->manipulateF( $query, array('integer'), array($a_usr_id) );
4699
4700 if($affected) return true;
4701 else return false;
4702 }

References $ilDB, and $query.

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

+ Here is the caller graph for this function:

◆ _isAnonymous()

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

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

5475 {
5476 return $usr_id == ANONYMOUS_USER_ID;
5477 }

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

+ Here is the caller graph for this function:

◆ _isDesktopItem()

static ilObjUser::_isDesktopItem (   $a_usr_id,
  $a_item_id,
  $a_type 
)
static

check wether an item is on the users desktop or not

Parameters
int$a_usr_idid of user object
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 3115 of file class.ilObjUser.php.

3116 {
3117 global $ilDB;
3118
3119 if (self::$is_desktop_item_loaded[$a_usr_id.":".$a_item_id])
3120 {
3121 return self::$is_desktop_item_cache[$a_usr_id.":".$a_item_id.":".$a_type];
3122 }
3123 $item_set = $ilDB->queryF("SELECT item_id FROM desktop_item WHERE ".
3124 "item_id = %s AND type = %s AND user_id = %s",
3125 array("integer", "text", "integer"),
3126 array($a_item_id, $a_type, $a_usr_id));
3127
3128 if ($ilDB->fetchAssoc($item_set))
3129 {
3130 return true;
3131 }
3132 else
3133 {
3134 return false;
3135 }
3136 }

References $a_type, and $ilDB.

Referenced by ilParticipant\addDesktopItem(), ilParticipants\addDesktopItem(), ilParticipant\dropDesktopItem(), ilParticipants\dropDesktopItem(), and isDesktopItem().

+ 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 @access public @access static

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

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

4382 {
4383 global $ilDB;
4384
4385 $q = "SELECT DISTINCT login, usr_id FROM usr_data ".
4386 "WHERE login = %s";
4387 $types[] = "text";
4388 $values[] = $a_login;
4389
4390 if ($a_user_id != 0)
4391 {
4392 $q.= " AND usr_id != %s ";
4393 $types[] = "integer";
4394 $values[] = $a_user_id;
4395 }
4396
4397 $r = $ilDB->queryF($q, $types, $values);
4398
4399 if ($row = $ilDB->fetchAssoc($r))
4400 {
4401 return $row['usr_id'];
4402 }
4403 return false;
4404 }

References $ilDB, $r, and $row.

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

+ 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 666 of file class.ilObjUser.php.

667 {
668 global $ilDB;
669
670 $res = $ilDB->queryF("SELECT ".$a_field." FROM usr_data WHERE usr_id = %s",
671 array("integer"), array($a_user_id));
672
673 while($set = $ilDB->fetchAssoc($res))
674 {
675 return $set[$a_field];
676 }
677 return false;
678 }

References $ilDB, and $res.

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

+ Here is the caller graph for this function:

◆ _lookupActive()

static ilObjUser::_lookupActive (   $a_usr_id)
static

Check user account active.

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

2146 {
2147 global $ilDB;
2148
2149 $query = 'SELECT usr_id FROM usr_data '.
2150 'WHERE active = '.$ilDB->quote(1,'integer').' '.
2151 'AND usr_id = '.$ilDB->quote($a_usr_id,'integer');
2152 $res = $ilDB->query($query);
2153 while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
2154 {
2155 return true;
2156 }
2157 return false;
2158 }

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

Referenced by ilCourseParticipantsTableGUI\fillRow(), ilGroupParticipantsTableGUI\fillRow(), and ilIndividualAssessmentMembersTableGUI\fillRow().

+ Here is the caller graph for this function:

◆ _lookupAuthMode()

static ilObjUser::_lookupAuthMode (   $a_usr_id)
static

lookup auth mode

@access public

Parameters
intusr_id

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

3711 {
3712 return (string) ilObjUser::_lookup($a_usr_id, "auth_mode");
3713 }
static _lookup($a_user_id, $a_field)
Private function for lookup methods.

References _lookup().

Referenced by ilECSAppEventListener\handleEvent(), ilAuthContainerMDB2\loginObserver(), and ilObjUserTest\testAuthAndEmailMethods().

+ 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 730 of file class.ilObjUser.php.

731 {
732 return ilObjUser::_lookup($a_user_id, "client_ip");
733 }

References _lookup().

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

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

◆ _lookupDesktopItems()

static ilObjUser::_lookupDesktopItems (   $user_id,
  $a_types = "" 
)
static

get all desktop items of user and specified type

note: the implementation of this method is not good style (directly reading tables object_data and object_reference), must be revised someday...

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

3200 {
3201 global $ilUser, $rbacsystem, $tree, $ilDB;
3202
3203 if ($a_types == "")
3204 {
3205 $is_nested_set = ($tree->getTreeImplementation() instanceof ilNestedSetTree);
3206
3207 $item_set = $ilDB->queryF("SELECT obj.obj_id, obj.description, oref.ref_id, obj.title, obj.type ".
3208 " FROM desktop_item it, object_reference oref ".
3209 ", object_data obj".
3210 " WHERE ".
3211 "it.item_id = oref.ref_id AND ".
3212 "oref.obj_id = obj.obj_id AND ".
3213 "it.user_id = %s", array("integer"), array($user_id));
3214 $items = $all_parent_path = array();
3215 while ($item_rec = $ilDB->fetchAssoc($item_set))
3216 {
3217 if ($tree->isInTree($item_rec["ref_id"])
3218 && $item_rec["type"] != "rolf"
3219 && $item_rec["type"] != "itgr") // due to bug 11508
3220 {
3221 $parent_ref = $tree->getParentId($item_rec["ref_id"]);
3222
3223 if(!isset($all_parent_path[$parent_ref]))
3224 {
3225 // #15746
3226 //if($is_nested_set)
3227 //{
3228 // $par_left = $tree->getLeftValue($parent_ref);
3229 // $all_parent_path[$parent_ref] = sprintf("%010d", $par_left);
3230 //}
3231 //else
3232 //{
3233 $node = $tree->getNodeData($parent_ref);
3234 $all_parent_path[$parent_ref] = $node["title"];
3235 //}
3236 }
3237
3238 $parent_path = $all_parent_path[$parent_ref];
3239
3240 $title = ilObject::_lookupTitle($item_rec["obj_id"]);
3241 $desc = ilObject::_lookupDescription($item_rec["obj_id"]);
3242 $items[$parent_path.$title.$item_rec["ref_id"]] =
3243 array("ref_id" => $item_rec["ref_id"],
3244 "obj_id" => $item_rec["obj_id"],
3245 "type" => $item_rec["type"],
3246 "title" => $title,
3247 "description" => $desc,
3248 "parent_ref" => $parent_ref);
3249 }
3250 }
3251 ksort($items);
3252 }
3253 else
3254 {
3255 // due to bug 11508
3256 if (!is_array($a_types))
3257 {
3258 $a_types = array($a_types);
3259 }
3260 $items = array();
3261 $foundsurveys = array();
3262 foreach($a_types as $a_type)
3263 {
3264 if ($a_type == "itgr")
3265 {
3266 continue;
3267 }
3268 $item_set = $ilDB->queryF("SELECT obj.obj_id, obj.description, oref.ref_id, obj.title FROM desktop_item it, object_reference oref ".
3269 ", object_data obj WHERE ".
3270 "it.item_id = oref.ref_id AND ".
3271 "oref.obj_id = obj.obj_id AND ".
3272 "it.type = %s AND ".
3273 "it.user_id = %s ".
3274 "ORDER BY title",
3275 array("text", "integer"),
3276 array($a_type, $user_id));
3277
3278 while ($item_rec = $ilDB->fetchAssoc($item_set))
3279 {
3280 $title = ilObject::_lookupTitle($item_rec["obj_id"]);
3281 $desc = ilObject::_lookupDescription($item_rec["obj_id"]);
3282 $items[$title.$a_type.$item_rec["ref_id"]] =
3283 array("ref_id" => $item_rec["ref_id"],
3284 "obj_id" => $item_rec["obj_id"], "type" => $a_type,
3285 "title" => $title, "description" => $desc);
3286 }
3287
3288 }
3289 ksort($items);
3290 }
3291
3292 return $items;
3293 }
Base class for nested set path based trees.
static _lookupTitle($a_id)
lookup object title
static _lookupDescription($a_id)
lookup object description
$ilUser
Definition: imgupload.php:18

References $a_type, ilObject\$desc, $ilDB, $ilUser, ilObject\$title, ilObject\_lookupDescription(), and ilObject\_lookupTitle().

Referenced by ilNewsItem\_getNewsItemsOfUser(), ilNote\_getRelatedObjectsOfUser(), getDesktopItems(), and ilCalendarCategories\readSelectedItemCalendars().

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

◆ _lookupEmail()

◆ _lookupExternalAccount()

static ilObjUser::_lookupExternalAccount (   $a_user_id)
static

lookup external account for login and authmethod

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

780 {
781 return ilObjUser::_lookup($a_user_id, "ext_account");
782 }

References _lookup().

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

+ 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 4314 of file class.ilObjUser.php.

4315 {
4316 global $ilDB;
4317
4318 if ($a_user_id > 0)
4319 {
4320 $set = $ilDB->queryF("SELECT feed_hash from usr_data WHERE usr_id = %s",
4321 array("integer"), array($a_user_id));
4322 if ($rec = $ilDB->fetchAssoc($set))
4323 {
4324 if (strlen($rec["feed_hash"]) == 32)
4325 {
4326 return $rec["feed_hash"];
4327 }
4328 else if($a_create)
4329 {
4330 $hash = md5(rand(1,9999999) + str_replace(" ", "", (string) microtime()));
4331 $ilDB->manipulateF("UPDATE usr_data SET feed_hash = %s".
4332 " WHERE usr_id = %s",
4333 array("text", "integer"),
4334 array($hash, $a_user_id));
4335 return $hash;
4336 }
4337 }
4338 }
4339
4340 return false;
4341 }

References $ilDB.

Referenced by ilUserFeedWriter\__construct().

+ 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 758 of file class.ilObjUser.php.

759 {
760 global $ilDB;
761
762 $res = $ilDB->queryF("SELECT * FROM usr_data WHERE usr_id = %s",
763 array("integer"), array($a_user_id));
764 $user_rec = $ilDB->fetchAssoc($res);
765 return $user_rec;
766 }

References $ilDB, and $res.

Referenced by ilObjSCORMVerification\createFromSCORMLM(), ilSCORMPresentationGUI\downloadCertificate(), ilTestExport\exportToCSV(), ilTestExport\exportToExcel(), ilSpecialUsersTableGUI\fillRow(), ilCourseCertificateAdapter\getCertificateVariablesForPresentation(), ilExerciseCertificateAdapter\getCertificateVariablesForPresentation(), ilTestCertificateAdapter\getCertificateVariablesForPresentation(), and ilObjUserTest\testCreateSetLookupDelete().

+ Here is the caller graph for this function:

◆ _lookupFullname()

static ilObjUser::_lookupFullname (   $a_user_id)
static

Lookup Full Name.

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

684 {
685 global $ilDB;
686
687 $set = $ilDB->queryF("SELECT title, firstname, lastname FROM usr_data WHERE usr_id = %s",
688 array("integer"), array($a_user_id));
689
690 if ($rec = $ilDB->fetchAssoc($set))
691 {
692 if ($rec["title"])
693 {
694 $fullname = $rec["title"]." ";
695 }
696 if ($rec["firstname"])
697 {
698 $fullname .= $rec["firstname"]." ";
699 }
700 if ($rec["lastname"])
701 {
702 $fullname .= $rec["lastname"];
703 }
704 }
705 return $fullname;
706 }

References $fullname, and $ilDB.

Referenced by ilCalendarBlockGUI\__construct(), ilExAssignmentTeam\addTeamMember(), ilCalendarAppointmentGUI\book(), ilObjStudyProgrammeIndividualPlanGUI\buildFrame(), ilCalendarAppointmentGUI\cancelBooking(), ilRbacLogTableGUI\fillRow(), ilLPTableBaseGUI\getExportMeta(), ilCalendarAppointmentPanelGUI\getHTML(), ilCalendarBlockGUI\getHTML(), ilExAssignmentTeamLogTableGUI\getItems(), ilExAssignmentTeam\getTeamId(), ilSCORMTrackingItemPerUserTableGUI\initTable(), ilSCORMTrackingItemsPerUserTableGUI\initTable(), ilBookingEntry\lookupManagedBookingsForObject(), ilSCORMTrackingItemsScoTableGUI\parse(), ilConsultationHoursTableGUI\parse(), ilExParticipantTableGUI\parseData(), ilExAssignmentTeam\removeTeamMember(), ilIndividualAssessmentMembersGUI\removeUserConfirmation(), ilCalendarMailNotification\send(), ilConsultationHoursGUI\sendInfoAboutUnassignedUsers(), ilWikiUtil\sendNotification(), ilNote\sendNotifications(), ilObjSurvey\sendTutorNotification(), and ilObjSurvey\sentReminder().

+ Here is the caller graph for this function:

◆ _lookupGender()

static ilObjUser::_lookupGender (   $a_user_id)
static

Lookup gender.

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

720 {
721 return ilObjUser::_lookup($a_user_id, "gender");
722 }

References _lookup().

Referenced by ilObjUserTest\testCreateSetLookupDelete().

+ 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 787 of file class.ilObjUser.php.

788 {
789 global $ilDB;
790
791 if (!is_array($a_user_str))
792 {
793 $res = $ilDB->queryF("SELECT usr_id FROM usr_data WHERE login = %s",
794 array("text"), array($a_user_str));
795 $user_rec = $ilDB->fetchAssoc($res);
796 return $user_rec["usr_id"];
797 }
798 else
799 {
800 $set = $ilDB->query("SELECT usr_id FROM usr_data ".
801 " WHERE ".$ilDB->in("login", $a_user_str, false, "text")
802 );
803 $ids = array();
804 while ($rec = $ilDB->fetchAssoc($set))
805 {
806 $ids[] = $rec["usr_id"];
807 }
808 return $ids;
809 }
810 }

References $ilDB, and $res.

Referenced by ilDiskQuotaSummaryNotification\__construct(), ilObjUserGUI\_goto(), ilSoapObjectAdministration\addObject(), ilOrgUnitStaffGUI\addOtherRoles(), ilOrgUnitStaffGUI\addStaff(), ilObjBlogGUI\addUserFromAutoComplete(), ilRepositorySearchGUI\addUserFromAutoComplete(), ilExerciseManagementGUI\addUserFromAutoCompleteObject(), ilExSubmissionTeamGUI\addUserFromAutoCompleteObject(), ilSkillProfileGUI\assignUser(), ilOrgUnitSimpleUserImport\buildUserId(), ilChatroomInviteUsersToPrivateRoomGUI\byLogin(), ilPermission2GUI\changeOwner(), checkUserId(), ilAuthProviderApache\doAuthentication(), ilAuthProviderShibboleth\doAuthentication(), ilAuthProviderCAS\doAuthentication(), ilAuthProviderRadius\doAuthentication(), ilServicesAuthenticationExtractor\extractAfterLogin(), ilAuthBase\failedLoginObserver(), ilMail\getCountRecipient(), ilMail\getEmailRecipients(), ilObjectPermissionStatusGUI\getUser(), getUserIdByLogin(), ilSystemSupportContacts\getValidSupportContactIds(), ilAuthFrontend\handleAuthenticationFail(), ilAuthProviderCAS\handleLDAPDataSource(), ilAuthProviderApache\handleLDAPDataSource(), ilAuthProviderECS\handleLogin(), ilSessionControl\handleLoginEvent(), ilPCParagraph\intLinks2xml(), ilChatroom\inviteUserToPrivateRoomByLogin(), ilAuthContainerMDB2\loginObserver(), ilAuthContainerECS\loginObserver(), ilStartUpGUI\migrateAccount2(), ilSoapRBACAdministration\parseUserID(), ilStartUpGUI\processCode(), ilECSCmsCourseMemberCommandQueueHandler\refreshAssignmentStatus(), ilDclRecordEditGUI\save(), ilObjSurveyGUI\savePropertiesObject(), ilSingleUserShareGUI\saveShare(), ilDiskQuotaSummaryNotification\send(), ilNote\sendNotifications(), ilRegistrationSettings\setApproveRecipientLogins(), ilSystemSupportContacts\setList(), ilObjDiskQuotaSettings\setSummaryRecipients(), ilObjUserTest\testCreateSetLookupDelete(), ilAuthProviderLDAP\updateAccount(), ilLDAPAttributeToUser\usersToXML(), ilRegistrationSettings\validate(), and ilUserImportParser\verifyEndTag().

+ Here is the caller graph for this function:

◆ _lookupLanguage()

static ilObjUser::_lookupLanguage (   $a_usr_id)
static

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

1960 {
1961 global $ilDB;
1962
1963 $q = "SELECT value FROM usr_pref WHERE usr_id= ".
1964 $ilDB->quote($a_usr_id, "integer")." AND keyword = ".
1965 $ilDB->quote('language', "text");
1966 $r = $ilDB->query($q);
1967
1968 while($row = $ilDB->fetchAssoc($r))
1969 {
1970 return $row['value'];
1971 }
1972 return 'en';
1973 }

References $ilDB, $r, and $row.

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

+ Here is the caller graph for this function:

◆ _lookupLastLogin()

static ilObjUser::_lookupLastLogin (   $a_user_id)
static

lookup last login

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

816 {
817 return ilObjUser::_lookup($a_user_id, "last_login");
818 }

References _lookup().

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

+ 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 771 of file class.ilObjUser.php.

772 {
773 return ilObjUser::_lookup($a_user_id, "login");
774 }

References _lookup().

Referenced by ilCourseXMLParser\__parseId(), ilRegistrationSettings\__read(), ilChatUserActionProvider\collectActionsForTargetUser(), ilWorkspaceUserActionProvider\collectActionsForTargetUser(), ilMailMemberSearchDataProvider\collectTableData(), ilObjRole\delete(), ilStartUpGUI\doStandardAuthentication(), ilObjSessionGUI\eventsListObject(), ilSessionOverviewGUI\exportCSV(), ilStudyProgrammeIndividualPlanTableGUI\fetchData(), ilMilestoneResponsiblesTableGUI\fillRow(), ilPageHistoryTableGUI\fillRow(), ilPDNewsTableGUI\fillRow(), ilTestServiceGUI\getAdditionalUsrDataHtmlAndPopulateWindowTitle(), ilAttendanceList\getHTML(), ilDAVServer\getLogin(), getLoginByUserId(), getLoginFromAuth(), ilConsultationHourAppointments\getManagedUsers(), ilConsultationHourAppointments\getManager(), ilNoteGUI\getNoteListHTML(), ilTestServiceGUI\getResultsHeadUserAndPass(), ilObjSurvey\getUserDataFromActiveId(), ilObjForumGUI\getUserNotificationTableData(), ilUserClipboard\getValidatedContent(), ilObjUserGUI\getValues(), ilAuthFrontend\handleAuthenticationSuccess(), ilCalendarAppointmentGUI\initForm(), ilMailSearchCoursesGUI\mailMembers(), ilMailSearchGroupsGUI\mailMembers(), ilContactGUI\mailToUsers(), ilPermission2GUI\owner(), ilSessionParticipantsTableGUI\parse(), ilCalendarSharedUserListTableGUI\parse(), ilUserClipboardTableGUI\parse(), ilObjCourseGUI\readMemberData(), ilObjGroupGUI\readMemberData(), ilCalendarEntry\readResponsibleUsers(), ilExerciseManagementGUI\redirectFeedbackMailObject(), ilBuddyList\request(), ilMailSummaryNotification\send(), ilMembershipCronNotifications\sendMail(), ilMailNotification\sendMail(), ilLPTableBaseGUI\sendMail(), ilObjContentObjectGUI\sendMailToBlockedUsers(), ilMailMemberSearchGUI\sendMailToSelectedUsers(), ilMembershipGUI\sendMailToSelectedUsers(), ilMembershipMailGUI\sendMailToSelectedUsers(), ilMembershipCronMinMembers\sendMessage(), ilWikiUtil\sendNotification(), ilNote\sendNotifications(), ilObjSurvey\sendTutorNotification(), ilObjSurvey\sentReminder(), ilMailSearchCoursesGUI\showMembers(), ilMailSearchGUI\showResults(), ilMailFolderGUI\showUser(), ilContactGUI\submitInvitation(), ilObjUserTest\testCreateSetLookupDelete(), ilBuddySystemGUI\transitionAsyncCommand(), ilBuddySystemGUI\transitionCommand(), updateLogin(), ilUserImportParser\verifyEndTag(), and ilPCParagraph\xml2output().

+ 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 741 of file class.ilObjUser.php.

742 {
743 global $ilDB;
744
745 $res = $ilDB->queryF("SELECT firstname, lastname, title, login FROM usr_data WHERE usr_id = %s",
746 array("integer"), array($a_user_id));
747 $user_rec = $ilDB->fetchAssoc($res);
748 return array("user_id" => $a_user_id,
749 "firstname" => $user_rec["firstname"],
750 "lastname" => $user_rec["lastname"],
751 "title" => $user_rec["title"],
752 "login" => $user_rec["login"]);
753 }

References $ilDB, and $res.

Referenced by ilExGradesTableGUI\__construct(), ilGroupXMLParser\__parseId(), ilObjTestAccess\_getParticipantData(), ilSoapLearningProgressAdministration\addUserProgress(), ilMailUserActionProvider\collectActionsForTargetUser(), ilMailMemberSearchDataProvider\collectTableData(), ilMembershipGUI\confirmAssignFromWaitingList(), ilObjSessionGUI\confirmAssignFromWaitingListObject(), ilMembershipGUI\confirmAssignSubscribers(), ilObjSessionGUI\confirmAssignSubscribersObject(), ilMembershipGUI\confirmDeleteParticipants(), ilMembershipGUI\confirmRefuseFromList(), ilObjSessionGUI\confirmRefuseFromListObject(), ilMembershipGUI\confirmRefuseSubscribers(), ilObjSessionGUI\confirmRefuseSubscribersObject(), ilOrgUnitStaffGUI\confirmRemoveUser(), ilSkillProfileGUI\confirmUserRemoval(), ilObjTestGUI\deleteSingleUserResultsObject(), ilLocalUserGUI\deleteUsers(), ilObjCategoryGUI\deleteUsersObject(), ilExSubmission\downloadAllAssignmentFiles(), ilBlogExerciseGUI\downloadExcSubFile(), ilPortfolioExerciseGUI\downloadExcSubFile(), ilExSubmission\downloadFiles(), ilExSubmission\downloadMultipleFiles(), ilObjSessionGUI\eventsListObject(), ilSessionOverviewGUI\exportCSV(), ilObjExercise\exportGradesExcel(), ilObjAssessmentFolderGUI\exportLogObject(), ilFileVersionTableGUI\fillRow(), ilRbacLogTableGUI\fillRow(), ilCalendarInboxSharedTableGUI\fillRow(), ilPageHistoryTableGUI\fillRow(), ilAssessmentFolderLogTableGUI\fillRow(), ilObjSurvey\getAppraiseesData(), ilSkillProfile\getAssignedUsers(), ilLMTracker\getBlockedUsersInformation(), ilAttendanceList\getHTML(), ilCourseParticipantsGroupsTableGUI\getItems(), ilSessionOverviewTableGUI\getItems(), ilSurveyParticipantsTableGUI\getItems(), ilBookingReservation\getListByDate(), ilExAssignment\getMultiFeedbackFiles(), ilPageObject\getPageContributors(), ilPageObject\getParentObjectContributors(), ilMilestoneResponsiblesTableGUI\getParticipantsAndResponsibles(), ilObjSurvey\getRatersData(), ilDclBaseRecordModel\getStandardField(), ilObjForumGUI\getUserNotificationTableData(), ilExerciseXMLWriter\handleAssignmentMembers(), ilWorkspaceShareTableGUI\importData(), ilLOMemberTestResultTableGUI\init(), ilWorkspaceShareTableGUI\initFilter(), ilExerciseManagementGUI\initIndividualDeadlineForm(), ilObjectCustomUserFieldsGUI\initMemberForm(), ilExParticipantTableGUI\initMode(), ilObjSurveyGUI\initPropertiesForm(), ilAuthContainerCalendarToken\loginObserver(), ilTestEvaluationGUI\outParticipantsResultsOverview(), ilCourseParticipantsTableGUI\parse(), ilGroupParticipantsTableGUI\parse(), ilSessionParticipantsTableGUI\parse(), ilCalendarSharedListTableGUI\parse(), ilCalendarSharedUserListTableGUI\parse(), ilConsultationHoursTableGUI\parse(), ilUserClipboardTableGUI\parse(), ilObjCourseGUI\readMemberData(), ilObjGroupGUI\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().

+ Here is the caller graph for this function:

◆ _lookupPref()

◆ _moveUsersToStyle()

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

skins and styles

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

2962 {
2963 global $ilDB;
2964
2965 $q = "SELECT up1.usr_id usr_id FROM usr_pref up1, usr_pref up2 ".
2966 " WHERE up1.keyword= ".$ilDB->quote("style", "text").
2967 " AND up1.value= ".$ilDB->quote($a_from_style, "text").
2968 " AND up2.keyword= ".$ilDB->quote("skin", "text").
2969 " AND up2.value= ".$ilDB->quote($a_from_skin, "text").
2970 " AND up1.usr_id = up2.usr_id ";
2971
2972 $usr_set = $ilDB->query($q);
2973
2974 while ($usr_rec = $ilDB->fetchAssoc($usr_set))
2975 {
2976 self::_writePref($usr_rec["usr_id"], "skin", $a_to_skin);
2977 self::_writePref($usr_rec["usr_id"], "style", $a_to_style);
2978 }
2979 }
static _writePref($a_usr_id, $a_keyword, $a_value)

References $ilDB, and _writePref().

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

+ Here is the call graph for this function:
+ 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

@access public

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

2786 {
2787 global $ilDB;
2788 $res = $ilDB->query("SELECT * FROM usr_data WHERE ".
2789 $ilDB->in("usr_id", $a_user_ids, false, "integer"));
2790 while ($row = $ilDB->fetchAssoc($res))
2791 {
2792 $user_data["$row[usr_id]"] = $row;
2793 }
2794 return $user_data ? $user_data : array();
2795 }

References $ilDB, $res, and $row.

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

+ Here is the caller graph for this function:

◆ _removeItemFromDesktops()

static ilObjUser::_removeItemFromDesktops (   $a_id)
static

removes object from all user's desktops @access public

Parameters
integerref_id
Returns
array user_ids of all affected users

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

3084 {
3085 global $ilDB;
3086
3087 $r = $ilDB->queryF("SELECT user_id FROM desktop_item WHERE item_id = %s",
3088 array("integer"), array($a_id));
3089
3090 $users = array();
3091
3092 while ($row = $ilDB->fetchObject($r))
3093 {
3094 $users[] = $row->user_id;
3095 } // while
3096
3097 if (count($users) > 0)
3098 {
3099 $ilDB->manipulateF("DELETE FROM desktop_item WHERE item_id = %s",
3100 array("integer"), array($a_id));
3101 }
3102
3103 return $users;
3104 }

References $ilDB, $r, and $row.

Referenced by ilUtil\removeItemFromDesktops().

+ Here is the caller graph for this function:

◆ _resetLoginAttempts()

static ilObjUser::_resetLoginAttempts (   $a_usr_id)
static

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

4671 {
4672 global $ilDB;
4673
4674 $query = "UPDATE usr_data SET login_attempts = 0 WHERE usr_id = %s";
4675 $affected = $ilDB->manipulateF( $query, array('integer'), array($a_usr_id) );
4676
4677 if($affected) return true;
4678 else return false;
4679 }

References $ilDB, and $query.

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

+ 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 4364 of file class.ilObjUser.php.

4365 {
4366 global $ilDB;
4367
4368 self::_writePref($a_user_id, "priv_feed_pass",
4369 ($a_password=="") ? "" : md5($a_password));
4370 }

References $ilDB, and _writePref().

+ Here is the call graph for this function:

◆ _setUserInactive()

static ilObjUser::_setUserInactive (   $a_usr_id)
static

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

4705 {
4706 global $ilDB;
4707
4708 $query = "UPDATE usr_data SET active = 0, inactivation_date = %s WHERE usr_id = %s";
4709 $affected = $ilDB->manipulateF( $query, array('timestamp', 'integer'), array(ilUtil::now(), $a_usr_id) );
4710
4711 if($affected) return true;
4712 else return false;
4713 }
static now()
Return current timestamp in Y-m-d H:i:s format.

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

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

+ 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.

@access public

Parameters

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

3667 {
3668 global $ilDB;
3669
3670 if(!is_array($a_usr_ids))
3671 {
3672 return false;
3673 }
3674
3675
3676 if( $a_status )
3677 {
3678 $q = "UPDATE usr_data SET active = 1, inactivation_date = NULL WHERE ".
3679 $ilDB->in("usr_id", $a_usr_ids, false, "integer");
3680 $ilDB->manipulate($q);
3681 }
3682 else
3683 {
3684 $usrId_IN_usrIds = $ilDB->in("usr_id", $a_usr_ids, false, "integer");
3685
3686 $q = "UPDATE usr_data SET active = 0 WHERE $usrId_IN_usrIds";
3687 $ilDB->manipulate($q);
3688
3689 $queryString = "
3690 UPDATE usr_data
3691 SET inactivation_date = %s
3692 WHERE inactivation_date IS NULL
3693 AND $usrId_IN_usrIds
3694 ";
3695 $ilDB->manipulateF($queryString, array('timestamp'), array(ilUtil::now()));
3696 }
3697
3698 return true;
3699 }

References $ilDB, and ilUtil\now().

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

+ 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 @access public

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

5128 {
5129 if($a_last_login !== null) $last_login = $a_last_login;
5130 else $last_login = date('Y-m-d H:i:s');
5131
5132 global $ilDB;
5133
5134 $query = "UPDATE usr_data SET last_login = %s WHERE usr_id = %s";
5135 $affected = $ilDB->manipulateF( $query, array('timestamp', 'integer'), array($last_login, $a_usr_id) );
5136
5137 if($affected) return $last_login;
5138 else return false;
5139 }

References $ilDB, $query, and date.

Referenced by ShibAuth\login().

+ Here is the caller graph for this function:

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

3831 {
3832 $webspace_dir = ilUtil::getWebspaceDir();
3833 $image_dir = $webspace_dir."/usr_images";
3834 $store_file = "usr_".$obj_id."."."jpg";
3835 $target_file = $image_dir."/$store_file";
3836
3837 chmod($tmp_file, 0770);
3838
3839 // take quality 100 to avoid jpeg artefacts when uploading jpeg files
3840 // taking only frame [0] to avoid problems with animated gifs
3841 $show_file = "$image_dir/usr_".$obj_id.".jpg";
3842 $thumb_file = "$image_dir/usr_".$obj_id."_small.jpg";
3843 $xthumb_file = "$image_dir/usr_".$obj_id."_xsmall.jpg";
3844 $xxthumb_file = "$image_dir/usr_".$obj_id."_xxsmall.jpg";
3845
3846 ilUtil::execConvert($tmp_file . "[0] -geometry 200x200 -quality 100 JPEG:".$show_file);
3847 ilUtil::execConvert($tmp_file . "[0] -geometry 100x100 -quality 100 JPEG:".$thumb_file);
3848 ilUtil::execConvert($tmp_file . "[0] -geometry 75x75 -quality 100 JPEG:".$xthumb_file);
3849 ilUtil::execConvert($tmp_file . "[0] -geometry 30x30 -quality 100 JPEG:".$xxthumb_file);
3850
3851 // store filename
3852 self::_writePref($obj_id, "profile_image", $store_file);
3853
3854 return TRUE;
3855 }
static execConvert($args)
execute convert command

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

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

+ 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 5002 of file class.ilObjUser.php.

5003 {
5004 global $ilDB;
5005
5006 $res = $ilDB->queryf('
5007 SELECT usr_id, create_date FROM usr_data
5008 WHERE reg_hash = %s',
5009 array('text'),
5010 array($a_hash));
5011 while($row = $ilDB->fetchAssoc($res))
5012 {
5013 require_once 'Services/Registration/classes/class.ilRegistrationSettings.php';
5014 $oRegSettigs = new ilRegistrationSettings();
5015
5016 if((int)$oRegSettigs->getRegistrationHashLifetime() != 0 &&
5017 time() - (int)$oRegSettigs->getRegistrationHashLifetime() > strtotime($row['create_date']))
5018 {
5019 require_once 'Services/Registration/exceptions/class.ilRegConfirmationLinkExpiredException.php';
5020 throw new ilRegConfirmationLinkExpiredException('reg_confirmation_hash_life_time_expired', $row['usr_id']);
5021 }
5022
5023 $ilDB->manipulateF('
5024 UPDATE usr_data
5025 SET reg_hash = %s
5026 WHERE usr_id = %s',
5027 array('text', 'integer'),
5028 array('', (int)$row['usr_id'])
5029 );
5030
5031 return (int)$row['usr_id'];
5032 }
5033
5034 require_once 'Services/Registration/exceptions/class.ilRegistrationHashNotFoundException.php';
5035 throw new ilRegistrationHashNotFoundException('reg_confirmation_hash_not_found');
5036 }
Class for user related exception handling in ILIAS.
Class for user related exception handling in ILIAS.
Class ilObjAuthSettingsGUI.

References $ilDB, $res, and $row.

Referenced by ilStartUpGUI\confirmRegistration().

+ Here is the caller graph for this function:

◆ _writeAuthMode()

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

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

1986 {
1987 global $ilDB;
1988
1989 $ilDB->manipulateF("UPDATE usr_data ".
1990 " SET auth_mode = %s WHERE usr_id = %s",
1991 array("text", "integer"),
1992 array($a_auth_mode, $a_usr_id));
1993 }

References $ilDB.

Referenced by ilObjUserTest\testAuthAndEmailMethods().

+ Here is the caller graph for this function:

◆ _writeExternalAccount()

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

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

1976 {
1977 global $ilDB;
1978
1979 $ilDB->manipulateF("UPDATE usr_data ".
1980 " SET ext_account = %s WHERE usr_id = %s",
1981 array("text", "integer"),
1982 array($a_ext_id, $a_usr_id));
1983 }

References $ilDB.

Referenced by ilObjUserTest\testAuthAndEmailMethods().

+ Here is the caller graph for this function:

◆ _writeHistory()

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

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

4739 {
4740 global $ilDB;
4741
4742 $timestamp = time();
4743
4744 $res = $ilDB->queryF('SELECT * FROM loginname_history WHERE usr_id = %s AND login = %s AND history_date = %s',
4745 array('integer', 'text', 'integer'),
4746 array($a_usr_id, $a_login, $timestamp));
4747
4748 if( $ilDB->numRows($res) == 0 )
4749 {
4750 $ilDB->manipulateF('
4751 INSERT INTO loginname_history
4752 (usr_id, login, history_date)
4753 VALUES (%s, %s, %s)',
4754 array('integer', 'text', 'integer'),
4755 array($a_usr_id, $a_login, $timestamp));
4756 }
4757
4758 return true;
4759 }
foreach($mandatory_scripts as $file) $timestamp
Definition: buildRTE.php:81

References $ilDB, $res, and $timestamp.

Referenced by updateLogin().

+ 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 1072 of file class.ilObjUser.php.

1073 {
1074 global $ilDB;
1075 $ilDB->replace("usr_pref",
1076 array(
1077 "usr_id" => array("integer", $a_usr_id),
1078 "keyword" => array("text", $a_keyword),
1079 ),
1080 array(
1081 "value" => array("text",$a_value)
1082 )
1083 );
1084
1085 /*
1086 self::_deletePref($a_usr_id, $a_keyword);
1087 if(strlen($a_value))
1088 {
1089 $ilDB->manipulateF(
1090 'INSERT INTO usr_pref (usr_id, keyword, value) VALUES (%s, %s, %s)',
1091 array('integer', 'text', 'text'),
1092 array($a_usr_id, $a_keyword, $a_value)
1093 );
1094 }*/
1095 }

References $ilDB.

Referenced by _moveUsersToStyle(), _setFeedPass(), _uploadPersonalPicture(), ilBadgeProfileGUI\saveSettings(), writePref(), and writePrefs().

+ Here is the caller graph for this function:

◆ activateDeletionFlag()

ilObjUser::activateDeletionFlag ( )

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

5480 {
5481 $this->writePref("delete_flag", true);
5482 }
writePref($a_keyword, $a_value)
write userpref to user table @access private

References writePref().

+ Here is the call graph for this function:

◆ addDesktopItem()

ilObjUser::addDesktopItem (   $a_item_id,
  $a_type,
  $a_par = "" 
)

add an item to user's personal desktop

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

3020 {
3021 ilObjUser::_addDesktopItem($this->getId(), $a_item_id, $a_type, $a_par);
3022 }
static _addDesktopItem($a_usr_id, $a_item_id, $a_type, $a_par="")
add an item to user's personal desktop
getId()
get object id @access public

References $a_type, _addDesktopItem(), and ilObject\getId().

+ 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 3308 of file class.ilObjUser.php.

3310 {
3311 global $ilDB;
3312
3313 if ($a_time == 0)
3314 {
3315 $a_time = date("Y-m-d H:i:s", time());
3316 }
3317
3318 $item_set = $ilDB->queryF("SELECT * FROM personal_clipboard WHERE ".
3319 "parent = %s AND item_id = %s AND type = %s AND user_id = %s",
3320 array("integer", "integer", "text", "integer"),
3321 array(0, $a_item_id, $a_type, $this->getId()));
3322
3323 // only insert if item is not already in clipboard
3324 if (!$d = $item_set->fetchRow())
3325 {
3326 $ilDB->manipulateF("INSERT INTO personal_clipboard ".
3327 "(item_id, type, user_id, title, parent, insert_time, order_nr) VALUES ".
3328 " (%s,%s,%s,%s,%s,%s,%s)",
3329 array("integer", "text", "integer", "text", "integer", "timestamp", "integer"),
3330 array($a_item_id, $a_type, $this->getId(), $a_title, (int) $a_parent, $a_time, (int) $a_order_nr));
3331 }
3332 else
3333 {
3334 $ilDB->manipulateF("UPDATE personal_clipboard SET insert_time = %s ".
3335 "WHERE user_id = %s AND item_id = %s AND type = %s AND parent = 0",
3336 array("timestamp", "integer", "integer", "text"),
3337 array($a_time, $this->getId(), $a_item_id, $a_type));
3338 }
3339 }
for($col=0; $col< 50; $col++) $d

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

+ 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 3344 of file class.ilObjUser.php.

3345 {
3346 global $ilDB;
3347 if ($a_time == 0)
3348 {
3349 $a_time = date("Y-m-d H:i:s", time());
3350 }
3351 $ilDB->insert("personal_pc_clipboard", array(
3352 "user_id" => array("integer", $this->getId()),
3353 "content" => array("clob", $a_content),
3354 "insert_time" => array("timestamp", $a_time),
3355 "order_nr" => array("integer", $a_nr)
3356 ));
3357 }
$a_content
Definition: workflow.php:94

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

+ Here is the call graph for this function:

◆ addUserDefinedFieldEntry()

ilObjUser::addUserDefinedFieldEntry ( )

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

4118 {
4119 global $ilDB;
4120
4121// not needed. no entry in udf_text/udf_clob means no value
4122
4123/* $query = "INSERT INTO udf_data (usr_id ) ".
4124 "VALUES( ".
4125 $ilDB->quote($this->getId(),'integer').
4126 ")";
4127 $res = $ilDB->manipulate($query);
4128*/
4129 return true;
4130 }

References $ilDB.

◆ assignData()

ilObjUser::assignData (   $a_data)

loads a record "user" from array @access public

Parameters
arrayuserdata

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

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

References $ilDB, $ilErr, ilObject\$lng, setAuthMode(), setBirthday(), setCity(), setClientIP(), setComment(), setCountry(), setDepartment(), setEmail(), setExternalAccount(), setFax(), setFirstname(), setFullname(), setGender(), setHobby(), setInactivationDate(), setInstitution(), setIsSelfRegistered(), setLastLogin(), setLastname(), setLastUpdate(), setLatitude(), setLocationZoom(), setLogin(), setLongitude(), setMatriculation(), setPasswd(), setPasswordEncodingType(), setPasswordSalt(), setPhoneHome(), setPhoneMobile(), setPhoneOffice(), setProfileIncomplete(), setSelectedCountry(), setStreet(), setTimeLimitFrom(), setTimeLimitMessage(), setTimeLimitOwner(), setTimeLimitUnlimited(), setTimeLimitUntil(), setUTitle(), and setZipcode().

Referenced by read().

+ 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 5608 of file class.ilObjUser.php.

5609 {
5610 $current = $this->$a_attr;
5611 if(is_array($current) && sizeof($current))
5612 {
5613 return implode(", ", $current);
5614 }
5615 }

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

+ Here is the caller graph for this function:

◆ checkTimeLimit()

ilObjUser::checkTimeLimit ( )

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

2264 {
2265 if($this->getTimeLimitUnlimited())
2266 {
2267 return true;
2268 }
2269 if($this->getTimeLimitFrom() < time() and $this->getTimeLimitUntil() > time())
2270 {
2271 return true;
2272 }
2273 return false;
2274 }

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

Referenced by ilAuthFrontend\checkTimeLimit().

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

◆ checkUserId()

ilObjUser::checkUserId ( )

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

2469 {
2470 global $ilAuth, $ilSetting;
2471
2474 if ($id > 0)
2475 {
2476 return $id;
2477 }
2478 return false;
2479 }
$login
all user related data in single vars @access public
static getLoginFromAuth()
Gets the username from $ilAuth, and converts it into an ILIAS login name.
static _lookupId($a_user_str)
Lookup id by login.

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

+ Here is the call graph for this function:

◆ clipboardDeleteAll()

ilObjUser::clipboardDeleteAll ( )

Delete objects of type for user.

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

3419 {
3420 global $ilDB;
3421
3422 $ilDB->manipulateF("DELETE FROM personal_clipboard WHERE ".
3423 "user_id = %s", array("integer"), array($this->getId()));
3424 }

References $ilDB, and ilObject\getId().

Referenced by delete().

+ 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 3405 of file class.ilObjUser.php.

3406 {
3407 global $ilDB;
3408
3409 $ilDB->manipulateF("DELETE FROM personal_clipboard WHERE ".
3410 "type = %s AND user_id = %s",
3411 array("text", "integer"),
3412 array($a_type, $this->getId()));
3413 }

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

+ 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 3386 of file class.ilObjUser.php.

3387 {
3388 global $ilDB;
3389
3390 $set = $ilDB->queryF("SELECT * FROM personal_clipboard WHERE ".
3391 "parent = %s AND type = %s AND user_id = %s",
3392 array("integer", "text", "integer"),
3393 array(0, $a_type, $this->getId()));
3394 if ($rec = $ilDB->fetchAssoc($set))
3395 {
3396 return true;
3397 }
3398
3399 return false;
3400 }

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

+ Here is the call graph for this function:

◆ copyProfilePicturesToDirectory()

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

Get profile picture direcotory.

Parameters

return

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

3961 {
3962 $a_dir = trim(str_replace("..", "", $a_dir));
3963 if ($a_dir == "" || !is_dir($a_dir))
3964 {
3965 return;
3966 }
3967
3968 $webspace_dir = ilUtil::getWebspaceDir();
3969 $image_dir = $webspace_dir."/usr_images";
3970 $images = array(
3971 "upload_".$a_user_id."pic",
3972 "usr_".$a_user_id."."."jpg",
3973 "usr_".$a_user_id."_small.jpg",
3974 "usr_".$a_user_id."_xsmall.jpg",
3975 "usr_".$a_user_id."_xxsmall.jpg",
3976 "upload_".$a_user_id);
3977 foreach ($images as $image)
3978 {
3979 if (is_file($image_dir."/".$image))
3980 {
3981 copy($image_dir."/".$image, $a_dir."/".$image);
3982 }
3983 }
3984 }

References ilUtil\getWebspaceDir().

Referenced by ilUserDataSet\getXmlRecord().

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

◆ delete()

ilObjUser::delete ( )

deletes a user @access public

Parameters
integeruser_id

Reimplemented from ilObject.

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

1240 {
1241 global $rbacadmin, $ilDB;
1242
1243 // deassign from ldap groups
1244 include_once('Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
1246 $mapping->deleteUser($this->getId());
1247
1248 // remove mailbox / update sent mails
1249 include_once ("Services/Mail/classes/class.ilMailbox.php");
1250 $mailbox = new ilMailbox($this->getId());
1251 $mailbox->delete();
1252 $mailbox->updateMailsOfDeletedUser($this->getLogin());
1253
1254 // delete feed blocks on personal desktop
1255 include_once("./Services/Block/classes/class.ilCustomBlock.php");
1256 $costum_block = new ilCustomBlock();
1257 $costum_block->setContextObjId($this->getId());
1258 $costum_block->setContextObjType("user");
1259 $c_blocks = $costum_block->queryBlocksForContext();
1260 include_once("./Services/Feeds/classes/class.ilPDExternalFeedBlock.php");
1261 foreach($c_blocks as $c_block)
1262 {
1263 if ($c_block["type"] == "pdfeed")
1264 {
1265 $fb = new ilPDExternalFeedBlock($c_block["id"]);
1266 $fb->delete();
1267 }
1268 }
1269
1270
1271 // delete block settings
1272 include_once("./Services/Block/classes/class.ilBlockSetting.php");
1274
1275 // delete user_account
1276 $ilDB->manipulateF("DELETE FROM usr_data WHERE usr_id = %s",
1277 array("integer"), array($this->getId()));
1278
1279 $this->deleteMultiTextFields();
1280
1281 // delete user_prefs
1283
1284 $this->removeUserPicture(false); // #8597
1285
1286 // delete user_session
1287 include_once("./Services/Authentication/classes/class.ilSession.php");
1289
1290 // remove user from rbac
1291 $rbacadmin->removeUser($this->getId());
1292
1293 // remove bookmarks
1294 // TODO: move this to class.ilBookmarkFolder
1295 $q = "DELETE FROM bookmark_tree WHERE tree = ".
1296 $ilDB->quote($this->getId(), "integer");
1297 $ilDB->manipulate($q);
1298
1299 $q = "DELETE FROM bookmark_data WHERE user_id = ".
1300 $ilDB->quote($this->getId(), "integer");
1301 $ilDB->manipulate($q);
1302
1303 // DELETE FORUM ENTRIES (not complete in the moment)
1304 include_once './Modules/Forum/classes/class.ilObjForum.php';
1305 ilObjForum::_deleteUser($this->getId());
1306
1307 // Delete link check notify entries
1308 include_once './Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
1310
1311 // Delete crs entries
1312 include_once './Modules/Course/classes/class.ilObjCourse.php';
1314
1315 // Delete user tracking
1316 include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
1318
1319 include_once 'Modules/Session/classes/class.ilEventParticipants.php';
1321
1322 // Delete Tracking data SCORM 2004 RTE
1323 include_once 'Modules/Scorm2004/classes/ilSCORM13Package.php';
1325
1326 // Delete Tracking data SCORM 1.2 RTE
1327 include_once 'Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php';
1329
1330 // remove all notifications
1331 include_once "./Services/Notification/classes/class.ilNotification.php";
1333
1334 // remove portfolios
1335 include_once "./Modules/Portfolio/classes/class.ilObjPortfolio.php";
1337
1338 // remove workspace
1339 include_once "./Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
1340 $tree = new ilWorkspaceTree($this->getId());
1341 $tree->cascadingDelete();
1342
1343 // remove disk quota entries
1344 include_once "./Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
1346
1347 // remove reminder entries
1348 require_once 'Services/User/classes/class.ilCronDeleteInactiveUserReminderMail.php';
1350
1351 // badges
1352 include_once "Services/Badge/classes/class.ilBadgeAssignment.php";
1354
1355 // Delete user defined field entries
1357
1358 // Delete clipboard entries
1359 $this->clipboardDeleteAll();
1360
1361 // Reset owner
1362 $this->resetOwner();
1363
1364 // Trigger deleteUser Event
1365 global $ilAppEventHandler;
1366 $ilAppEventHandler->raise(
1367 'Services/User', 'deleteUser', array('usr_id' => $this->getId())
1368 );
1369
1370 // delete object data
1371 parent::delete();
1372 return true;
1373 }
static deleteByUserId($a_user_id)
static _deleteSettingsOfUser($a_user)
Delete block settings of user.
This is the super class of all custom blocks.
static deleteByOwner($a_owner_id)
Delete all entries for owner.
static _getInstance()
Get singleton instance of this class.
static _deleteUser($a_usr_id)
Mail Box class Base class for creating and handling mail boxes.
static removeForUser($user_id)
Remove all notifications for given user.
static _deleteUser($a_usr_id)
static deleteUserPortfolios($a_user_id)
Delete all portfolio data for user.
static _deleteUser($a_usr_id)
deleteMultiTextFields()
Remove multi-text values from DB
removeUserPicture($a_do_update=true)
Remove user picture.
clipboardDeleteAll()
Delete objects of type for user.
static _deleteAllPref($a_user_id)
Deletes a userpref value of the user from the database @access public.
getLogin()
get login / username @access public
deleteUserDefinedFieldEntries()
Custom block for external feeds on personal desktop.
static _removeTrackingDataForUser($user_id)
static _destroyByUserId($a_user_id)
Destroy session.
Tree handler for personal workspace.

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

+ Here is the call graph for this function:

◆ deleteMultiTextFields()

ilObjUser::deleteMultiTextFields ( )
protected

Remove multi-text values from DB

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

5717 {
5718 global $ilDB;
5719
5720 if(!$this->getId())
5721 {
5722 return;
5723 }
5724
5725 $ilDB->manipulate("DELETE FROM usr_data_multi".
5726 " WHERE usr_id = ".$ilDB->quote($this->getId(), "integer"));
5727 }

References $ilDB, and ilObject\getId().

Referenced by delete(), and updateMultiTextFields().

+ 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 @access public.

Parameters
stringkeyword

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

1030 {
1031 self::_deletePref($this->getId(), $a_keyword);
1032 }

References ilObject\getId().

+ Here is the call graph for this function:

◆ deleteUserDefinedFieldEntries()

ilObjUser::deleteUserDefinedFieldEntries ( )

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

4133 {
4134 global $ilDB;
4135
4136 include_once("./Services/User/classes/class.ilUserDefinedData.php");
4138
4139 // wrong place...
4140/* $query = "DELETE FROM udf_data ".
4141 "WHERE usr_id = ".$ilDB->quote($this->getId(),'integer');
4142 $res = $ilDB->manipulate($query);*/
4143
4144 return true;
4145 }
static deleteEntriesOfUser($a_user_id)
Delete data of user.

References $ilDB, ilUserDefinedData\deleteEntriesOfUser(), and ilObject\getId().

Referenced by delete().

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

◆ dropDesktopItem()

ilObjUser::dropDesktopItem (   $a_item_id,
  $a_type 
)

drop an item from user's personal desktop

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

3073 {
3074 ilObjUser::_dropDesktopItem($this->getId(), $a_item_id, $a_type);
3075 }
static _dropDesktopItem($a_usr_id, $a_item_id, $a_type)
drop an item from user's personal desktop

References $a_type, _dropDesktopItem(), and ilObject\getId().

+ Here is the call graph for this function:

◆ exportPersonalData()

ilObjUser::exportPersonalData ( )

Export personal data.

Parameters

return

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

5216 {
5217 include_once("./Services/Export/classes/class.ilExport.php");
5218 $exp = new ilExport();
5219 $dir = ilExport::_getExportDirectory($this->getId(), "xml", "usr", "personal_data");
5220 ilUtil::delDir($dir, true);
5221 $title = $this->getLastname().", ".$this->getLastname()." [".$this->getLogin()."]";
5222 $exp->exportEntity("personal_data", $this->getId(), "",
5223 "Services/User", $title, $dir);
5224 }
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.
getLastname()
get lastname @access public
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively

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

+ 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 5729 of file class.ilObjUser.php.

5730 {
5731 global $ilDB;
5732
5733 $res = array();
5734
5735 $sql = "SELECT DISTINCT(value)".
5736 " FROM usr_data_multi".
5737 " WHERE ".$ilDB->like("value", "text", "%".$a_term."%");
5738 if($a_field_id)
5739 {
5740 $sql .= " AND field_id = ".$ilDB->quote($a_field_id, "text");
5741 }
5742 if($a_user_id)
5743 {
5744 $sql .= " AND usr_id <> ".$ilDB->quote($a_user_id, "integer");
5745 }
5746 $sql .= " ORDER BY value";
5747 $set = $ilDB->query($sql);
5748 while($row = $ilDB->fetchAssoc($set))
5749 {
5750 $res[] = $row["value"];
5751 }
5752
5753 return $res;
5754 }

References $ilDB, $res, and $row.

Referenced by ilPublicUserProfileGUI\getAutocompleteResult().

+ Here is the caller graph for this function:

◆ getActive()

ilObjUser::getActive ( )

get user active state @access public

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

2138 {
2139 return $this->active;
2140 }

References $active.

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

+ Here is the caller graph for this function:

◆ getAgreeDate()

ilObjUser::getAgreeDate ( )

get the date when the user accepted the user agreement @access public

Returns
string date of last update

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

2095 {
2096 return $this->agree_date;
2097 }

References $agree_date.

◆ getApproveDate()

ilObjUser::getApproveDate ( )

get the date when the user account was approved @access public

Returns
string approve date

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

2084 {
2085 return $this->approve_date;
2086 }

References $approve_date.

◆ getAuthMode()

ilObjUser::getAuthMode (   $a_auth_key = false)

get auth mode @access public

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

3583 {
3584 if (!$a_auth_key)
3585 {
3586 return $this->auth_mode;
3587 }
3588
3589 include_once('./Services/Authentication/classes/class.ilAuthUtils.php');
3590 return ilAuthUtils::_getAuthMode($this->auth_mode);
3591 }
static _getAuthMode($a_auth_mode, $a_db_handler='')

References $auth_mode, and ilAuthUtils\_getAuthMode().

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

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

◆ getBirthday()

ilObjUser::getBirthday ( )

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

5052 {
5053 return $this->birthday;
5054 }

References $birthday.

◆ getCity()

ilObjUser::getCity ( )

get city @access public

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

1662 {
1663 return $this->city;
1664 }

References $city.

Referenced by ilPersonalProfileGUI\addLocationToForm().

+ Here is the caller graph for this function:

◆ getClientIP()

ilObjUser::getClientIP ( )

get client ip number @access public

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

1817 {
1818 return $this->client_ip;
1819 }

References $client_ip.

Referenced by ilAuthFrontend\checkIp().

+ Here is the caller graph for this function:

◆ getClipboardChilds()

ilObjUser::getClipboardChilds (   $a_parent,
  $a_insert_time 
)

Get childs of an item.

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

3470 {
3471 global $ilDB, $ilUser;
3472
3473 $objs = $ilDB->queryF("SELECT * FROM personal_clipboard WHERE ".
3474 "user_id = %s AND parent = %s AND insert_time = %s ".
3475 " ORDER BY order_nr",
3476 array("integer", "integer", "timestamp"),
3477 array($ilUser->getId(), (int) $a_parent, $a_insert_time));
3478 $objects = array();
3479 while ($obj = $ilDB->fetchAssoc($objs))
3480 {
3481 if ($obj["type"] == "mob")
3482 {
3483 $obj["title"] = ilObject::_lookupTitle($obj["item_id"]);
3484 }
3485 $objects[] = array ("id" => $obj["item_id"],
3486 "type" => $obj["type"], "title" => $obj["title"], "insert_time" => $obj["insert_time"]);
3487 }
3488 return $objects;
3489 }

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

+ 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 3429 of file class.ilObjUser.php.

3430 {
3431 global $ilDB;
3432
3433 $par = "";
3434 if ($a_top_nodes_only)
3435 {
3436 $par = " AND parent = ".$ilDB->quote(0, "integer")." ";
3437 }
3438
3439 $type_str = ($a_type != "")
3440 ? " AND type = ".$ilDB->quote($a_type, "text")." "
3441 : "";
3442 $q = "SELECT * FROM personal_clipboard WHERE ".
3443 "user_id = ".$ilDB->quote($this->getId(), "integer")." ".
3444 $type_str.$par.
3445 " ORDER BY order_nr";
3446 $objs = $ilDB->query($q);
3447 $objects = array();
3448 while ($obj = $ilDB->fetchAssoc($objs))
3449 {
3450 if ($obj["type"] == "mob")
3451 {
3452 $obj["title"] = ilObject::_lookupTitle($obj["item_id"]);
3453 }
3454 if ($obj["type"] == "incl")
3455 {
3456 include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
3457 $obj["title"] = ilMediaPoolPage::lookupTitle($obj["item_id"]);
3458 }
3459 $objects[] = array ("id" => $obj["item_id"],
3460 "type" => $obj["type"], "title" => $obj["title"],
3461 "insert_time" => $obj["insert_time"]);
3462 }
3463 return $objects;
3464 }
static lookupTitle($a_page_id)
Lookup title.

References $a_type, $ilDB, ilObject\_lookupTitle(), ilObject\getId(), and ilMediaPoolPage\lookupTitle().

+ Here is the call graph for this function:

◆ getComment()

ilObjUser::getComment ( )

get referral comment @access public

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

2063 {
2065 }

References $referral_comment.

◆ getCountry()

ilObjUser::getCountry ( )

Get country (free text)

@access public

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

1702 {
1703 return $this->country;
1704 }

References $country.

Referenced by ilPersonalProfileGUI\addLocationToForm().

+ 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 1999 of file class.ilObjUser.php.

2000 {
2001 return $_SESSION['lang'];
2002 }

References $_SESSION.

◆ getDateFormat()

ilObjUser::getDateFormat ( )

get date format

@access public

Returns

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

1159 {
1160 if($format = $this->getPref('date_format'))
1161 {
1162 return $format;
1163 }
1164 else
1165 {
1166 include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
1168 return $settings->getDefaultDateFormat();
1169 }
1170 }
static _getInstance()
get singleton instance
getPref($a_keyword)
get a user preference

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

+ Here is the call graph for this function:

◆ getDepartment()

ilObjUser::getDepartment ( )

get department @access public

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

1624 {
1625 return $this->department;
1626 }

References $department.

◆ getDesktopItems()

ilObjUser::getDesktopItems (   $a_types = "")

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

3189 {
3190 return $this->_lookupDesktopItems($this->getId(), $a_types);
3191 }
static _lookupDesktopItems($user_id, $a_types="")
get all desktop items of user and specified type

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

+ Here is the call 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.

@access public

Returns
integer

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

1939 {
1940 return $this->prefs["disk_quota"] ? $this->prefs["disk_quota"] : 0;
1941 }

◆ getEmail()

ilObjUser::getEmail ( )

get email address @access public

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

1872 {
1873 return $this->email;
1874 }

References $email.

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

+ Here is the caller graph for this function:

◆ getExternalAccount()

ilObjUser::getExternalAccount ( )

get external account

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

@access     public

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

3613 {
3614 return $this->ext_account;
3615 }

Referenced by ilECSAppEventListener\handleMembership().

+ Here is the caller graph for this function:

◆ getFax()

ilObjUser::getFax ( )

get fax @access public

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

1798 {
1799 return $this->fax;
1800 }

References $fax.

◆ getFirstLettersOfLastnames()

static ilObjUser::getFirstLettersOfLastnames ( )
static

Get first letters of all lastnames.

Parameters

return

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

5160 {
5161 global $ilDB;
5162
5163 $q = "SELECT DISTINCT ".$ilDB->upper($ilDB->substr("lastname", 1, 1))." let".
5164 " FROM usr_data".
5165 " WHERE usr_id <> ".$ilDB->quote(ANONYMOUS_USER_ID, "integer").
5166 " ORDER BY let";
5167 $let_set = $ilDB->query($q);
5168
5169 $lets = array();
5170 while ($let_rec = $ilDB->fetchAssoc($let_set))
5171 {
5172 $let[$let_rec["let"]] = $let_rec["let"];
5173 }
5174 return $let;
5175 }

References $ilDB.

Referenced by ilObjUserFolderGUI\viewObject().

+ Here is the caller graph for this function:

◆ getFirstname()

ilObjUser::getFirstname ( )

get firstname @access public

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

1567 {
1568 return $this->firstname;
1569 }

References $firstname.

Referenced by ilIndividualAssessmentMembers\buildNewRecordOfUser(), getPublicName(), and shibUser\returnNewLoginName().

+ Here is the caller graph for this function:

◆ getFullname()

ilObjUser::getFullname (   $a_max_strlen = 0)

get fullname @access 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 1428 of file class.ilObjUser.php.

1429 {
1430 if (!$a_max_strlen)
1431 {
1432 return ilUtil::stripSlashes($this->fullname);
1433 }
1434
1435 if (strlen($this->fullname) <= $a_max_strlen)
1436 {
1437 return ilUtil::stripSlashes($this->fullname);
1438 }
1439
1440 if ((strlen($this->utitle) + strlen($this->lastname) + 4) <= $a_max_strlen)
1441 {
1442 return ilUtil::stripSlashes($this->utitle." ".substr($this->firstname,0,1).". ".$this->lastname);
1443 }
1444
1445 if ((strlen($this->firstname) + strlen($this->lastname) + 1) <= $a_max_strlen)
1446 {
1447 return ilUtil::stripSlashes($this->firstname." ".$this->lastname);
1448 }
1449
1450 if ((strlen($this->lastname) + 3) <= $a_max_strlen)
1451 {
1452 return ilUtil::stripSlashes(substr($this->firstname,0,1).". ".$this->lastname);
1453 }
1454
1455 return ilUtil::stripSlashes(substr($this->lastname,0,$a_max_strlen));
1456 }
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References ilUtil\stripSlashes().

Referenced by shibUser\createFields().

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

◆ getGender()

ilObjUser::getGender ( )

get gender @access public

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

1525 {
1526 return $this->gender;
1527 }

References $gender.

◆ getGeneralInterests()

ilObjUser::getGeneralInterests ( )

Get general interests.

Returns
array $value

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

5528 {
5530 }

References $interests_general.

Referenced by updateMultiTextFields().

+ Here is the caller graph for this function:

◆ getGeneralInterestsAsText()

ilObjUser::getGeneralInterestsAsText ( )

Get general interests as plain text.

Returns
string

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

5538 {
5539 return $this->buildTextFromArray("interests_general");
5540 }
buildTextFromArray($a_attr)
Convert multi-text values to plain text.

References buildTextFromArray().

+ Here is the call graph for this function:

◆ getHobby()

ilObjUser::getHobby ( )

get hobby @access public

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

1891 {
1892 return $this->hobby;
1893 }

References $hobby.

◆ getInactivationDate()

ilObjUser::getInactivationDate ( )

getter for inactivation date

Returns
string $inactivation_date

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

5362 {
5364 }

References $inactivation_date.

◆ getInstitution()

ilObjUser::getInstitution ( )

get institution @access public

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

1605 {
1606 return $this->institution;
1607 }

References $institution.

◆ getLanguage()

ilObjUser::getLanguage ( )

returns a 2char-language-string @access public

Returns
string language

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

1912 {
1913 return $this->prefs["language"];
1914 }

Referenced by ilNotificationConfig\getUserInstance(), and ilMailTemplateContext\initLanguage().

+ Here is the caller graph for this function:

◆ getLastLogin()

ilObjUser::getLastLogin ( )

returns last login date @access public

Returns
string date

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

2030 {
2031 return $this->last_login;
2032 }

◆ getLastname()

ilObjUser::getLastname ( )

get lastname @access public

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

1586 {
1587 return $this->lastname;
1588 }

References $lastname.

Referenced by ilIndividualAssessmentMembers\buildNewRecordOfUser(), exportPersonalData(), getPublicName(), and shibUser\returnNewLoginName().

+ Here is the caller graph for this function:

◆ getLastPasswordChangeTS()

ilObjUser::getLastPasswordChangeTS ( )

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

1954 {
1956 }

References $last_password_change_ts.

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

+ Here is the caller graph for this function:

◆ getLastUpdate()

ilObjUser::getLastUpdate ( )

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

2044 {
2045 return $this->last_update;
2046 }

References ilObject\$last_update.

◆ getLatitude()

ilObjUser::getLatitude ( )

Get Latitude.

Returns
string Latitude

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

2401 {
2402 return $this->latitude;
2403 }

References $latitude.

Referenced by ilPersonalProfileGUI\addLocationToForm().

+ Here is the caller graph for this function:

◆ getLocationZoom()

ilObjUser::getLocationZoom ( )

Get Location Zoom.

Returns
int Location Zoom

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

2441 {
2442 return $this->loc_zoom;
2443 }

References $loc_zoom.

Referenced by ilPersonalProfileGUI\addLocationToForm().

+ Here is the caller graph for this function:

◆ getLogin()

ilObjUser::getLogin ( )

get login / username @access public

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

1473 {
1474 return $this->login;
1475 }

References $login.

Referenced by ilIndividualAssessmentMembers\buildNewRecordOfUser(), shibUser\create(), delete(), exportPersonalData(), getPublicName(), ilPasswordAssistanceGUI\sendPasswordAssistanceMail(), and updateLogin().

+ Here is the caller graph for this function:

◆ getLoginAttempts()

ilObjUser::getLoginAttempts ( )

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

2258 {
2259 return $this->login_attempts;
2260 }

References $login_attempts.

◆ getLoginByUserId()

ilObjUser::getLoginByUserId (   $a_userid)

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

2616 {
2617 $login = ilObjUser::_lookupLogin($a_userid);
2618 return $login ? $login : false;
2619 }
static _lookupLogin($a_user_id)
lookup login

References $login, and _lookupLogin().

+ 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 2484 of file class.ilObjUser.php.

2485 {
2486 global $ilAuth;
2487
2488 $uid = $GLOBALS['DIC']['ilAuthSession']->getUserId();
2490
2491 // BEGIN WebDAV: Strip Microsoft Domain Names from logins
2492 require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
2494 {
2496 }
2497 return $login;
2498 }
static toUsernameWithoutDomain($a_login)
Static function removes Microsoft domain name from username webdav related.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

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

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

+ 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 2420 of file class.ilObjUser.php.

2421 {
2422 return $this->longitude;
2423 }

References $longitude.

Referenced by ilPersonalProfileGUI\addLocationToForm().

+ Here is the caller graph for this function:

◆ getLookingForHelp()

ilObjUser::getLookingForHelp ( )

Get help looking for.

Returns
array $value

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

5588 {
5590 }

References $interests_help_looking.

Referenced by updateMultiTextFields().

+ Here is the caller graph for this function:

◆ getLookingForHelpAsText()

ilObjUser::getLookingForHelpAsText ( )

Get help looking for as plain text.

Returns
string

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

5598 {
5599 return $this->buildTextFromArray("interests_help_looking");
5600 }

References buildTextFromArray().

+ Here is the call graph for this function:

◆ getMatriculation()

ilObjUser::getMatriculation ( )

get matriculation number @access public

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

1836 {
1837 return $this->matriculation;
1838 }

References $matriculation.

◆ getOfferingHelp()

ilObjUser::getOfferingHelp ( )

Get help offering.

Returns
array $value

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

5558 {
5560 }

References $interests_help_offered.

Referenced by updateMultiTextFields().

+ Here is the caller graph for this function:

◆ getOfferingHelpAsText()

ilObjUser::getOfferingHelpAsText ( )

Get help offering as plain text.

Returns
string

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

5568 {
5569 return $this->buildTextFromArray("interests_help_offered");
5570 }

References buildTextFromArray().

+ Here is the call graph for this function:

◆ getOrgUnitsRepresentation()

ilObjUser::getOrgUnitsRepresentation ( )
Returns
String

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

3564 {
3566 }
static lookupOrgUnitsRepresentation($a_usr_id)
lokup org unit representation

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

+ 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. @access public
See also
getPasswdType

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

1496 {
1497 return $this->passwd;
1498 }

References $passwd.

Referenced by ilUserPasswordManager\verifyPassword().

+ Here is the caller graph for this function:

◆ getPasswdType()

ilObjUser::getPasswdType ( )

get password type

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

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

1506 {
1507 return $this->passwd_type;
1508 }

References $passwd_type.

◆ getPasswordAge()

ilObjUser::getPasswordAge ( )

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

2351 {
2352 $current_ts = time();
2353 $pass_change_ts = $this->getLastPasswordChangeTS();
2354 $password_age = (int) ( ($current_ts - $pass_change_ts) / 86400 );
2355 return $password_age;
2356 }

References getLastPasswordChangeTS().

+ Here is the call graph for this function:

◆ getPasswordEncodingType()

ilObjUser::getPasswordEncodingType ( )
Returns
string

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

297 {
299 }

References $password_encoding_type.

Referenced by ilUserPasswordManager\verifyPassword().

+ Here is the caller graph for this function:

◆ getPasswordSalt()

ilObjUser::getPasswordSalt ( )
Returns
string|null

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

313 {
315 }

References $password_salt.

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

+ Here is the caller graph for this function:

◆ getPCClipboardContent()

ilObjUser::getPCClipboardContent ( )

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

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

3363 {
3364 global $ilDB;
3365
3366 $set = $ilDB->queryF("SELECT MAX(insert_time) mtime FROM personal_pc_clipboard ".
3367 " WHERE user_id = %s", array("integer"), array($this->getId()));
3368 $row = $ilDB->fetchAssoc($set);
3369
3370 $set = $ilDB->queryF("SELECT * FROM personal_pc_clipboard ".
3371 " WHERE user_id = %s AND insert_time = %s ORDER BY order_nr ASC",
3372 array("integer", "timestamp"),
3373 array($this->getId(), $row["mtime"]));
3374 $content = array();
3375 while ($row = $ilDB->fetchAssoc($set))
3376 {
3377 $content[] = $row["content"];
3378 }
3379
3380 return $content;
3381 }

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

+ Here is the call graph for this function:

◆ getPersonalDataExportFile()

ilObjUser::getPersonalDataExportFile ( )

Get personal data export file.

Parameters

return

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

5233 {
5234 include_once("./Services/Export/classes/class.ilExport.php");
5235 $dir = ilExport::_getExportDirectory($this->getId(), "xml", "usr", "personal_data");
5236 if (!is_dir($dir))
5237 {
5238 return "";
5239 }
5240 foreach(ilUtil::getDir($dir) as $entry)
5241 {
5242 if (is_int(strpos($entry["entry"], ".zip")))
5243 {
5244 return $entry["entry"];
5245 }
5246 }
5247
5248 return "";
5249 }
static getDir($a_dir, $a_rec=false, $a_sub_dir="")
get directory

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

Referenced by sendPersonalDataFile().

+ 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 3866 of file class.ilObjUser.php.

3867 {
3868 if(isset(self::$personal_image_cache[$this->getId()][$a_size][(int)$a_force_pic]))
3869 {
3870 return self::$personal_image_cache[$this->getId()][$a_size][(int)$a_force_pic];
3871 }
3872
3873 self::$personal_image_cache[$this->getId()][$a_size][(int)$a_force_pic] = ilObjUser::_getPersonalPicturePath($this->getId(), $a_size, $a_force_pic);
3874
3875 return self::$personal_image_cache[$this->getId()][$a_size][(int)$a_force_pic];
3876 }
static _getPersonalPicturePath($a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false)
Get path to personal picture.

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

Referenced by ilForumAuthorInformation\getUserImagePath().

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

◆ getPersonalWorkspaceDiskQuota()

ilObjUser::getPersonalWorkspaceDiskQuota ( )

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

1944 {
1945 return $this->prefs["wsp_disk_quota"] ? $this->prefs["wsp_disk_quota"] : 0;
1946 }

◆ getPhoneHome()

ilObjUser::getPhoneHome ( )

get home phone @access public

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

1760 {
1761 return $this->phone_home;
1762 }

References $phone_home.

◆ getPhoneMobile()

ilObjUser::getPhoneMobile ( )

get mobile phone @access public

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

1779 {
1780 return $this->phone_mobile;
1781 }

References $phone_mobile.

◆ getPhoneOffice()

ilObjUser::getPhoneOffice ( )

get office phone @access public

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

1741 {
1742 return $this->phone_office;
1743 }

References $phone_office.

◆ getPref()

ilObjUser::getPref (   $a_keyword)

get a user preference

Parameters
stringname of parameter @access public

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

1192 {
1193 if (array_key_exists($a_keyword, $this->prefs))
1194 {
1195 return $this->prefs[$a_keyword];
1196 }
1197 else
1198 {
1199 return FALSE;
1200 }
1201 }

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

+ Here is the caller graph for this function:

◆ getProfileIncomplete()

ilObjUser::getProfileIncomplete ( )

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

2280 {
2281 if($this->id == ANONYMOUS_USER_ID)
2282 {
2283 return false;
2284 }
2285 return $this->profile_incomplete;
2286 }

◆ getPublicName()

ilObjUser::getPublicName ( )

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

Returns
string

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

4730 {
4731 if ($this->hasPublicProfile())
4732 return $this->getFirstname()." ".$this->getLastname()." (".$this->getLogin().")";
4733 else
4734 return $this->getLogin();
4735
4736 }
hasPublicProfile()
returns true if public is profile, false otherwise
getFirstname()
get firstname @access public

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

+ Here is the call graph for this function:

◆ getSelectedCountry()

ilObjUser::getSelectedCountry ( )

Get selected country (selection drop down)

Returns
string selected country

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

1722 {
1723 return $this->sel_country;
1724 }

References $sel_country.

◆ getStoredActive()

ilObjUser::getStoredActive (   $a_id)

get user active state

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

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

2195 {
2196 $active = ilObjUser::_lookup($a_id, "active");
2197 return $active ? true : false;
2198 }

References $active, and _lookup().

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

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

◆ getStreet()

ilObjUser::getStreet ( )

get street @access public

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

1643 {
1644 return $this->street;
1645 }

References $street.

Referenced by ilPersonalProfileGUI\addLocationToForm().

+ Here is the caller graph for this function:

◆ getTimeFormat()

ilObjUser::getTimeFormat ( )

get time format

@access public

Returns

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

1139 {
1140 if($format = $this->getPref('time_format'))
1141 {
1142 return $format;
1143 }
1144 else
1145 {
1146 include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
1148 return $settings->getDefaultTimeFormat();
1149 }
1150 }

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

+ Here is the call graph for this function:

◆ getTimeLimitFrom()

ilObjUser::getTimeLimitFrom ( )

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

2224 {
2225 return $this->time_limit_from;
2226 }

Referenced by checkTimeLimit().

+ Here is the caller graph for this function:

◆ getTimeLimitMessage()

ilObjUser::getTimeLimitMessage ( )

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

2248 {
2249 return $this->time_limit_message;
2250 }

◆ getTimeLimitOwner()

ilObjUser::getTimeLimitOwner ( )

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

2216 {
2217 return $this->time_limit_owner ? $this->time_limit_owner : 7;
2218 }

◆ getTimeLimitUnlimited()

ilObjUser::getTimeLimitUnlimited ( )

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

2240 {
2241 return $this->time_limit_unlimited;
2242 }

Referenced by checkTimeLimit().

+ Here is the caller graph for this function:

◆ getTimeLimitUntil()

ilObjUser::getTimeLimitUntil ( )

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

2232 {
2233 return $this->time_limit_until;
2234 }

Referenced by checkTimeLimit(), and ilECSAppEventListener\extendAccount().

+ Here is the caller graph for this function:

◆ getTimeZone()

ilObjUser::getTimeZone ( )

get timezone of user

@access public

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

1119 {
1120 if($tz = $this->getPref('user_tz'))
1121 {
1122 return $tz;
1123 }
1124 else
1125 {
1126 include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
1128 return $settings->getDefaultTimeZone();
1129 }
1130 }

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

+ Here is the call graph for this function:

◆ getUserDefinedData()

ilObjUser::getUserDefinedData ( )

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

4048 {
4049 return $this->user_defined_data ? $this->user_defined_data : array();
4050 }

◆ getUserIdByEmail()

ilObjUser::getUserIdByEmail (   $a_email)
static

STATIC METHOD get the user_id of an email address.

Parameters
stringemail of user
Returns
integer id of user

@access public

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

2597 {
2598 global $ilDB;
2599
2600 $res = $ilDB->queryF("SELECT usr_id FROM usr_data ".
2601 "WHERE email = %s", array("text"), array($a_email));
2602
2603 $row = $ilDB->fetchObject($res);
2604 return $row->usr_id ? $row->usr_id : 0;
2605 }

References $ilDB, $res, and $row.

Referenced by ilObjUserTest\testAuthAndEmailMethods().

+ Here is the caller graph for this function:

◆ getUserIdByLogin()

static ilObjUser::getUserIdByLogin (   $a_login)
static

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

2557 {
2558 return (int) ilObjUser::_lookupId($a_login);
2559 }

References _lookupId().

Referenced by ilUserImportParser\importEndTag(), ilSoapUserAdministration\lookupUser(), ilMailLoginOrEmailAddressAddressType\resolve(), ilPasswordAssistanceGUI\submitAssistanceForm(), ilObjCourse\validateInfoSettings(), and ilUserImportParser\verifyEndTag().

+ Here is the call graph for this function:
+ 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 5420 of file class.ilObjUser.php.

5421 {
5422 global $ilDB;
5423
5424 $date_is = ($a_agreed)
5425 ? "IS NOT NULL"
5426 : "IS NULL";
5427
5428 $users = (is_array($a_users))
5429 ? " AND ".$ilDB->in("usr_id", $a_users, false, "integer")
5430 : "";
5431
5432 $set = $ilDB->query("SELECT usr_id FROM usr_data ".
5433 " WHERE agree_date ".$date_is.
5434 $users);
5435 $ret = array();
5436 while ($rec = $ilDB->fetchAssoc($set))
5437 {
5438 $ret[] = $rec["usr_id"];
5439 }
5440 return $ret;
5441 }
$ret
Definition: parser.php:6

References $ilDB, and $ret.

Referenced by ilAwarenessUserCollector\collectUsers().

+ 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 4652 of file class.ilObjUser.php.

4653 {
4654 global $ilDB;
4655
4656 $users = array();
4657 $set = $ilDB->query("SELECT usr_id FROM usr_pref ".
4658 " WHERE keyword = ".$ilDB->quote($a_keyword, "text").
4659 " AND ".$ilDB->in("usr_id", $a_user_ids, false, "integer").
4660 " AND value = ".$ilDB->quote($a_val, "text")
4661 );
4662 while ($rec = $ilDB->fetchAssoc($set))
4663 {
4664 $users[] = $rec["usr_id"];
4665 }
4666 return $users;
4667 }

References $ilDB.

Referenced by ilAwarenessUserCollector\collectUsers().

+ 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) @access public

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

1548 {
1549 return $this->utitle;
1550 }

References $utitle.

◆ getZipcode()

ilObjUser::getZipcode ( )

get zipcode @access public

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

1681 {
1682 return $this->zipcode;
1683 }

References $zipcode.

◆ hasActiveSession()

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

Check for simultaneous login.

Returns
bool

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

2452 {
2453 global $ilDB;
2454
2455 $set = $ilDB->queryf('
2456 SELECT COUNT(*) session_count
2457 FROM usr_session WHERE user_id = %s AND expires > %s AND session_id != %s ',
2458 array('integer', 'integer', 'text'),
2459 array($a_user_id, time(), $a_session_id));
2460 $row = $ilDB->fetchAssoc($set);
2461 return (bool)$row['session_count'];
2462 }

References $ilDB, and $row.

Referenced by ilAuthFrontend\checkSimultaneousLogins(), and ilAuthBase\loginObserver().

+ Here is the caller graph for this function:

◆ hasDeletionFlag()

ilObjUser::hasDeletionFlag ( )

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

5490 {
5491 return (bool)$this->getPref("delete_flag");
5492 }

References getPref().

+ Here is the call graph for this function:

◆ hasPublicProfile()

ilObjUser::hasPublicProfile ( )

returns true if public is profile, false otherwise

Returns
boolean

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

4720 {
4721 return in_array($this->getPref("public_profile"), array("y", "g"));
4722 }

References getPref().

Referenced by getPublicName().

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

◆ hasToAcceptTermsOfService()

ilObjUser::hasToAcceptTermsOfService ( )
Returns
bool

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

5370 {
5371 require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
5372
5373 if(
5375 null == $this->agree_date &&
5376 'root' != $this->login &&
5377 !in_array($this->getId(), array(ANONYMOUS_USER_ID, SYSTEM_USER_ID))
5378 )
5379 {
5380 return true;
5381 }
5382
5383 return false;
5384 }

References ilObject\getId(), and ilTermsOfServiceHelper\isEnabled().

+ Here is the call graph for this function:

◆ hasToAcceptTermsOfServiceInSession()

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

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

5449 {
5450 if(null === $status)
5451 {
5452 return ilSession::get('has_to_accept_agr_in_session');
5453 }
5454
5455 require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
5457 {
5458 ilSession::set('has_to_accept_agr_in_session', (int)$status);
5459 }
5460 }
static set($a_var, $a_val)
Set a value.
static get($a_var)
Get a value.

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

Referenced by ilTermsOfServiceHelper\trackAcceptance().

+ 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_bookmarks,
  $a_notes,
  $a_calendar 
)

Import personal data.

Parameters

return

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

5276 {
5277 include_once("./Services/Export/classes/class.ilImport.php");
5278 $imp = new ilImport();
5279 if (!$a_profile_data)
5280 {
5281 $imp->addSkipEntity("Services/User", "usr_profile");
5282 }
5283 if (!$a_settings)
5284 {
5285 $imp->addSkipEntity("Services/User", "usr_setting");
5286 }
5287 if (!$a_bookmarks)
5288 {
5289 $imp->addSkipEntity("Services/Bookmarks", "bookmarks");
5290 }
5291 if (!$a_notes)
5292 {
5293 $imp->addSkipEntity("Services/Notes", "user_notes");
5294 }
5295 if (!$a_calendar)
5296 {
5297 $imp->addSkipEntity("Services/Calendar", "calendar");
5298 }
5299 $imp->importEntity($a_file["tmp_name"], $a_file["name"], "personal_data",
5300 "Services/User");
5301 }
Import class.

◆ initInactivationDate()

static ilObjUser::initInactivationDate (   $usrIds)
staticprivate

@global type $ilDB

Parameters
type$usrIds

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

5309 {
5310 global $ilDB;
5311
5312 $NOW = $ilDB->now();
5313
5314 $usrId_IN_usrIds = $ilDB->in('usr_id', $usrIds, false, 'integer');
5315
5316 $queryString = "
5317 UPDATE usr_data
5318 SET inactivation_date = $NOW
5319 WHERE inactivation_date IS NULL
5320 AND $usrId_IN_usrIds
5321 ";
5322
5323 $ilDB->manipulate($queryString);
5324 }

References $ilDB.

◆ isAnonymous()

ilObjUser::isAnonymous ( )
Returns
bool

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

5466 {
5467 return self::_isAnonymous($this->getId());
5468 }
static _isAnonymous($usr_id)

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

Referenced by ilMainMenuGUI\renderOnScreenNotifications().

+ 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 5194 of file class.ilObjUser.php.

5195 {
5196 return (boolean) $_SESSION["user_captcha_verified"];
5197 }

References $_SESSION.

◆ isCurrentUserActive()

ilObjUser::isCurrentUserActive ( )

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

2529 {
2530 global $ilDB,$ilAuth;
2531
2533 $set = $ilDB->queryF("SELECT active FROM usr_data WHERE login= %s",
2534 array("text"),
2535 array($login));
2536 //query has got a result
2537 if ($rec = $ilDB->fetchAssoc($set))
2538 {
2539 if ($rec["active"])
2540 {
2541 return true;
2542 }
2543 }
2544
2545 return false;
2546 }

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

+ Here is the call graph for this function:

◆ isDesktopItem()

ilObjUser::isDesktopItem (   $a_item_id,
  $a_type 
)

check wether an item is on the users desktop or not

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

3184 {
3185 return ilObjUser::_isDesktopItem($this->getId(), $a_item_id, $a_type);
3186 }
static _isDesktopItem($a_usr_id, $a_item_id, $a_type)
check wether an item is on the users desktop or not

References $a_type, _isDesktopItem(), and ilObject\getId().

+ Here is the call graph for this function:

◆ isPasswordChangeDemanded()

ilObjUser::isPasswordChangeDemanded ( )
Returns
bool

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

2292 {
2293 if ($this->id == ANONYMOUS_USER_ID) {
2294 return false;
2295 }
2296
2297 if ($this->id == SYSTEM_USER_ID) {
2298 require_once './Services/User/classes/class.ilUserPasswordManager.php';
2299 if (
2300 \ilUserPasswordManager::getInstance()->verifyPassword($this, base64_decode('aG9tZXI=')) &&
2302 ) {
2303 return true;
2304 } else {
2305 return false;
2306 }
2307 }
2308
2309 require_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
2311
2312 if (
2314 $security->isPasswordChangeOnFirstLoginEnabled() &&
2315 $this->getLastPasswordChangeTS() == 0 &&
2316 $this->is_self_registered == false
2317 ) {
2318 return true;
2319 }
2320
2321 return false;
2322 }
static _needsExternalAccountByAuthMode($a_auth_mode)
Check if chosen auth mode needs an external account entry.
getAuthMode($a_auth_key=false)
get auth mode @access public
static _getInstance()
Get instance of ilSecuritySettings.
static getInstance()
Single method to reduce footprint (included files, created instances)

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

+ Here is the call graph for this function:

◆ isPasswordExpired()

ilObjUser::isPasswordExpired ( )

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

2325 {
2326 if ($this->id == ANONYMOUS_USER_ID) {
2327 return false;
2328 }
2329
2330 require_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
2332 if ($this->getLastPasswordChangeTS() > 0) {
2333 $max_pass_age = $security->getPasswordMaxAge();
2334 if ($max_pass_age > 0) {
2335 $max_pass_age_ts = ($max_pass_age * 86400);
2336 $pass_change_ts = $this->getLastPasswordChangeTS();
2337 $current_ts = time();
2338
2339 if (($current_ts - $pass_change_ts) > $max_pass_age_ts) {
2341 return true;
2342 }
2343 }
2344 }
2345 }
2346
2347 return false;
2348 }

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

+ Here is the call graph for this function:

◆ isSelfRegistered()

ilObjUser::isSelfRegistered ( )

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

5503 {
5504 return (bool) $this->is_self_registered;
5505 }

References $is_self_registered.

◆ lookupMatriculation()

static ilObjUser::lookupMatriculation (   $a_usr_id)
static

Lookup matriculation.

Returns
string matricualtion
Parameters
int$a_usr_id@access public

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

1847 {
1848 global $ilDB;
1849
1850 $query = "SELECT matriculation FROM usr_data ".
1851 "WHERE usr_id = ".$ilDB->quote($a_usr_id);
1852 $res = $ilDB->query($query);
1854 return $row->matriculation ? $row->matriculation : '';
1855 }

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

Referenced by ilObjCourseGrouping\_checkGroupingDependencies().

+ 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 3554 of file class.ilObjUser.php.

3555 {
3556 require_once('./Modules/OrgUnit/classes/PathStorage/class.ilOrgUnitPathStorage.php');
3557 return ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($a_usr_id);
3558 }

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

+ Here is the caller graph for this function:

◆ preloadIsDesktopItem()

static ilObjUser::preloadIsDesktopItem (   $a_usr_id,
  $a_item_ids 
)
static

Preload desktop item information.

Parameters

return

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

3145 {
3146 global $ilDB;
3147
3148 if (!is_array($a_item_ids))
3149 {
3150 return;
3151 }
3152
3153 $item_ids = array();
3154 foreach ($a_item_ids as $id)
3155 {
3156 if (!self::$is_desktop_item_loaded[$a_usr_id.":".$id])
3157 {
3158 $item_ids[] = $id;
3159 }
3160 self::$is_desktop_item_loaded[$a_usr_id.":".$id] = true;
3161 }
3162
3163 if (count($item_ids) > 0)
3164 {
3165 $item_set = $ilDB->query("SELECT item_id, type FROM desktop_item WHERE ".
3166 $ilDB->in("item_id", $item_ids, false, "integer").
3167 " AND user_id = ".$ilDB->quote($a_usr_id, "integer"));
3168 while ($r = $ilDB->fetchAssoc($item_set))
3169 {
3170 self::$is_desktop_item_cache[$a_usr_id.":".$r["item_id"].":".$r["type"]]
3171 = true;
3172 }
3173 }
3174 }

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

Referenced by ilObjectListGUIPreloader\preload().

+ Here is the caller graph for this function:

◆ read()

ilObjUser::read ( )

loads a record "user" from database @access private

Reimplemented from ilObject.

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

221 {
222 global $ilErr, $ilDB;
223
224 // Alex: I have removed the JOIN to rbac_ua, since there seems to be no
225 // use (3.11.0 alpha)
226 /*$q = "SELECT * FROM usr_data ".
227 "LEFT JOIN rbac_ua ON usr_data.usr_id=rbac_ua.usr_id ".
228 "WHERE usr_data.usr_id= ".$ilDB->quote($this->id); */
229 $r = $ilDB->queryF("SELECT * FROM usr_data ".
230 "WHERE usr_id= %s", array("integer"), array($this->id));
231
232 if ($data = $ilDB->fetchAssoc($r))
233 {
234 // convert password storage layout used by table usr_data into
235 // storage layout used by class ilObjUser
236 $data["passwd_type"] = IL_PASSWD_CRYPTED;
237
238 // this assign must not be set via $this->assignData($data)
239 // because this method will be called on profile updates and
240 // would set this values to 0, because they arent posted from form
241 $this->setLastPasswordChangeTS( $data['last_password_change'] );
242 $this->setLoginAttempts( $data['login_attempts'] );
243
244
245 // fill member vars in one shot
246 $this->assignData($data);
247
248 //get userpreferences from usr_pref table
249 $this->readPrefs();
250
251 //set language to default if not set
252 if ($this->prefs["language"] == "")
253 {
254 $this->prefs["language"] = $this->oldPrefs["language"];
255 }
256
257 //check skin-setting
258 include_once("./Services/Style/System/classes/class.ilStyleDefinition.php");
259 if ($this->prefs["skin"] == "" ||
260 !ilStyleDefinition::skinExists($this->prefs["skin"]))
261 {
262 $this->prefs["skin"] = $this->oldPrefs["skin"];
263 }
264
265 $this->skin = $this->prefs["skin"];
266
267 //check style-setting (skins could have more than one stylesheet
268 if ($this->prefs["style"] == "" ||
269 (!ilStyleDefinition::skinExists($this->skin) && ilStyleDefinition::styleExistsForSkinId($this->skin,$this->prefs["style"])))
270 {
271 //load default (css)
272 $this->prefs["style"] = $this->ilias->ini->readVariable("layout","style");
273 }
274
275 if (empty($this->prefs["hits_per_page"]))
276 {
277 $this->prefs["hits_per_page"] = 10;
278 }
279 }
280 else
281 {
282 $ilErr->raiseError("<b>Error: There is no dataset with id ".
283 $this->id."!</b><br />class: ".get_class($this)."<br />Script: ".__FILE__.
284 "<br />Line: ".__LINE__, $ilErr->FATAL);
285 }
286
287 $this->readMultiTextFields();
288 $this->readUserDefinedFields();
289
290 parent::read();
291 }
const IL_PASSWD_CRYPTED
readMultiTextFields()
Fetch multi-text values from DB.
readPrefs()
get all user preferences @access private
setLastPasswordChangeTS($a_last_password_change_ts)
assignData($a_data)
loads a record "user" from array @access public
setLoginAttempts($a_login_attempts)
static skinExists($skin_id, ilSystemStyleConfig $system_style_config=null)
Check whether a skin exists.
static styleExistsForSkinId($skin_id, $style_id)

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

Referenced by __construct().

+ 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 5620 of file class.ilObjUser.php.

5621 {
5622 global $ilDB;
5623
5624 if(!$this->getId())
5625 {
5626 return;
5627 }
5628
5629 $set = $ilDB->query("SELECT field_id,value".
5630 " FROM usr_data_multi".
5631 " WHERE usr_id = ".$ilDB->quote($this->getId(), "integer").
5632 " ORDER BY value");
5633 while($row = $ilDB->fetchAssoc($set))
5634 {
5635 $values[$row["field_id"]][] = $row["value"];
5636 }
5637
5638 if(isset($values["interests_general"]))
5639 {
5640 $this->setGeneralInterests($values["interests_general"]);
5641 }
5642 else
5643 {
5644 $this->setGeneralInterests();
5645 }
5646 if(isset($values["interests_help_offered"]))
5647 {
5648 $this->setOfferingHelp($values["interests_help_offered"]);
5649 }
5650 else
5651 {
5652 $this->setOfferingHelp();
5653 }
5654 if(isset($values["interests_help_looking"]))
5655 {
5656 $this->setLookingForHelp($values["interests_help_looking"]);
5657 }
5658 else
5659 {
5660 $this->setLookingForHelp();
5661 }
5662 }
setLookingForHelp(array $value=null)
Set help looking for.
setGeneralInterests(array $value=null)
Set general interests.
setOfferingHelp(array $value=null)
Set help offering.

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

Referenced by read().

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

◆ readPrefs()

ilObjUser::readPrefs ( )

get all user preferences @access private

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

1223 {
1224 global $ilDB;
1225
1226 if (is_array($this->prefs))
1227 {
1228 $this->oldPrefs = $this->prefs;
1229 }
1230
1231 $this->prefs = ilObjUser::_getPreferences($this->id);
1232 }
static _getPreferences($user_id)
get preferences for user

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

Referenced by read().

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

◆ readUserDefinedFields()

ilObjUser::readUserDefinedFields ( )

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

4097 {
4098 global $ilDB;
4099
4100 include_once("./Services/User/classes/class.ilUserDefinedData.php");
4101 $udata = new ilUserDefinedData($this->getId());
4102
4103/* $query = "SELECT * FROM udf_data ".
4104 "WHERE usr_id = ".$ilDB->quote($this->getId(),'integer');
4105
4106 $res = $this->db->query($query);
4107 while($row = $res->fetchRow(ilDBConstants::FETCHMODE_ASSOC))
4108 {
4109 $this->user_defined_data = $row;
4110 }*/
4111
4112 $this->user_defined_data = $udata->getAll();
4113
4114 return true;
4115 }
Class ilUserDefinedData.

References $ilDB, and ilObject\getId().

Referenced by read().

+ 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 @access public

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

827 {
828 global $ilDB;
829
830 $ilDB->manipulateF("UPDATE usr_data SET ".
831 "last_login = ".$ilDB->now().
832 " WHERE usr_id = %s",
833 array("integer"), array($this->id));
834 }

References $ilDB.

◆ removeDeletionFlag()

ilObjUser::removeDeletionFlag ( )

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

5485 {
5486 $this->writePref("delete_flag", false);
5487 }

References writePref().

+ 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 3523 of file class.ilObjUser.php.

3524 {
3525 global $ilDB;
3526
3527 $q = "DELETE FROM personal_clipboard WHERE ".
3528 "item_id = ".$ilDB->quote($a_item_id, "integer").
3529 " AND type = ".$ilDB->quote($a_type, "text")." ".
3530 " AND user_id = ".$ilDB->quote($this->getId(), "integer");
3531 $ilDB->manipulate($q);
3532 }

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

+ Here is the call graph for this function:

◆ removeUserPicture()

ilObjUser::removeUserPicture (   $a_do_update = true)

Remove user picture.

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

3991 {
3992 $webspace_dir = ilUtil::getWebspaceDir();
3993 $image_dir = $webspace_dir."/usr_images";
3994 $file = $image_dir."/usr_".$this->getID()."."."jpg";
3995 $thumb_file = $image_dir."/usr_".$this->getID()."_small.jpg";
3996 $xthumb_file = $image_dir."/usr_".$this->getID()."_xsmall.jpg";
3997 $xxthumb_file = $image_dir."/usr_".$this->getID()."_xxsmall.jpg";
3998 $upload_file = $image_dir."/upload_".$this->getID();
3999
4000 if($a_do_update)
4001 {
4002 // remove user pref file name
4003 $this->setPref("profile_image", "");
4004 $this->update();
4005 }
4006
4007 if (@is_file($file))
4008 {
4009 unlink($file);
4010 }
4011 if (@is_file($thumb_file))
4012 {
4013 unlink($thumb_file);
4014 }
4015 if (@is_file($xthumb_file))
4016 {
4017 unlink($xthumb_file);
4018 }
4019 if (@is_file($xxthumb_file))
4020 {
4021 unlink($xxthumb_file);
4022 }
4023 if (@is_file($upload_file))
4024 {
4025 unlink($upload_file);
4026 }
4027 }
setPref($a_keyword, $a_value)
set a user preference
update()
update object in db

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

Referenced by delete().

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

◆ resetInactivationDate()

static ilObjUser::resetInactivationDate (   $usrIds)
staticprivate

@global type $ilDB

Parameters
type$usrIds

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

5332 {
5333 global $ilDB;
5334
5335 $usrId_IN_usrIds = $ilDB->in('usr_id', $usrIds, false, 'integer');
5336
5337 $queryString = "
5338 UPDATE usr_data
5339 SET inactivation_date = NULL
5340 WHERE $usrId_IN_usrIds
5341 ";
5342
5343 $ilDB->manipulate($queryString);
5344 }

References $ilDB.

◆ resetLastPasswordChange()

ilObjUser::resetLastPasswordChange ( )

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

2374 {
2375 global $ilDB;
2376
2377 $query = "UPDATE usr_data SET last_password_change = 0 " .
2378 "WHERE usr_id = %s";
2379 $affected = $ilDB->manipulateF( $query, array('integer'),
2380 array($this->getId()) );
2381 if($affected) return true;
2382 else return false;
2383 }

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

+ Here is the call graph for this function:

◆ resetOwner()

ilObjUser::resetOwner ( )

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

5142 {
5143 global $ilDB;
5144
5145 $query = "UPDATE object_data SET owner = 0 ".
5146 "WHERE owner = ".$ilDB->quote($this->getId(),'integer');
5147 $ilDB->query($query);
5148
5149 return true;
5150 }

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

Referenced by delete().

+ 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

@access public

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

2632 {
2633 global $ilias, $ilDB, $ilLog;
2634
2635
2636 $query = "SELECT usr_data.usr_id, usr_data.login, usr_data.firstname, usr_data.lastname, usr_data.email, usr_data.active FROM usr_data ";
2637
2638 $without_anonymous_users = true;
2639
2640 // determine join filter
2641 $join_filter = " WHERE ";
2642 if ($filter_settings !== FALSE && strlen($filter_settings))
2643 {
2644 switch ($filter_settings)
2645 {
2646 case 3:
2647 // show only users without courses
2648 $join_filter = " LEFT JOIN obj_members ON usr_data.usr_id = obj_members.usr_id WHERE obj_members.usr_id IS NULL AND ";
2649 break;
2650 case 5:
2651 // show only users with a certain course membership
2652 $ref_id = $_SESSION["user_filter_data"];
2653 if ($ref_id)
2654 {
2655 $join_filter = " LEFT JOIN obj_members ON usr_data.usr_id = obj_members.usr_id WHERE obj_members.obj_id = ".
2656 "(SELECT obj_id FROM object_reference WHERE ref_id = ".$ilDB->quote($ref_id, "integer").") AND ";
2657 }
2658 break;
2659 case 6:
2660 global $rbacreview;
2661 $ref_id = $_SESSION["user_filter_data"];
2662 if ($ref_id)
2663 {
2664 $local_roles = $rbacreview->getRolesOfRoleFolder($ref_id,false);
2665 if (is_array($local_roles) && count($local_roles))
2666 {
2667 $join_filter = " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE ".
2668 $ilDB->in("rbac_ua.rol_id", $local_roles, false, $local_roles)." AND ";
2669 }
2670 }
2671 break;
2672 case 7:
2673 global $rbacreview;
2674 $rol_id = $_SESSION["user_filter_data"];
2675 if ($rol_id)
2676 {
2677 $join_filter = " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE rbac_ua.rol_id = ".
2678 $ilDB->quote($rol_id, "integer")." AND ";
2679 $without_anonymous_users = false;
2680 }
2681 break;
2682 }
2683 }
2684 // This is a temporary hack to search users by their role
2685 // See Mantis #338. This is a hack due to Mantis #337.
2686 if (strtolower(substr($a_search_str, 0, 5)) == "role:")
2687 {
2688 $query = "SELECT DISTINCT usr_data.usr_id,usr_data.login,usr_data.firstname,usr_data.lastname,usr_data.email ".
2689 "FROM object_data,rbac_ua,usr_data ".
2690 "WHERE ".$ilDB->like("object_data.title", "text", "%".substr($a_search_str,5)."%").
2691 " AND object_data.type = 'role' ".
2692 "AND rbac_ua.rol_id = object_data.obj_id ".
2693 "AND usr_data.usr_id = rbac_ua.usr_id ".
2694 "AND rbac_ua.usr_id != ".$ilDB->quote(ANONYMOUS_USER_ID, "integer");
2695 }
2696 else
2697 {
2698 $query.= $join_filter.
2699 "(".$ilDB->like("usr_data.login", "text", "%".$a_search_str."%")." ".
2700 "OR ".$ilDB->like("usr_data.firstname", "text", "%".$a_search_str."%")." ".
2701 "OR ".$ilDB->like("usr_data.lastname", "text", "%".$a_search_str."%")." ".
2702 "OR ".$ilDB->like("usr_data.email", "text", "%".$a_search_str."%").") ";
2703
2704 if ($filter_settings !== FALSE && strlen($filter_settings))
2705 {
2706 switch ($filter_settings)
2707 {
2708 case 0:
2709 $query.= " AND usr_data.active = ".$ilDB->quote(0, "integer")." ";
2710 break;
2711 case 1:
2712 $query.= " AND usr_data.active = ".$ilDB->quote(1, "integer")." ";
2713 break;
2714 case 2:
2715 $query.= " AND usr_data.time_limit_unlimited = ".$ilDB->quote(0, "integer")." ";
2716 break;
2717 case 4:
2718 $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"]));
2719 $query.= " AND last_login < ".$ilDB->quote($date, "timestamp")." ";
2720 break;
2721 }
2722 }
2723
2724 if ($without_anonymous_users)
2725 {
2726 $query.= "AND usr_data.usr_id != ".$ilDB->quote(ANONYMOUS_USER_ID, "integer");
2727 }
2728
2729 if (is_numeric($active) && $active > -1 && $filter_settings === FALSE)
2730 {
2731 $query.= " AND active = ".$ilDB->quote($active, "integer")." ";
2732 }
2733
2734 }
2735 $ilLog->write($query);
2736 $res = $ilDB->query($query);
2737 while ($row = $ilDB->fetchObject($res))
2738 {
2739 $users[] = array(
2740 "usr_id" => $row->usr_id,
2741 "login" => $row->login,
2742 "firstname" => $row->firstname,
2743 "lastname" => $row->lastname,
2744 "email" => $row->email,
2745 "active" => $row->active);
2746 $ids[] = $row->usr_id;
2747 }
2748 if ($a_return_ids_only)
2749 return $ids ? $ids : array();
2750 else
2751 return $users ? $users : array();
2752 }

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

Referenced by ilObjUserTest\testSearch().

+ Here is the caller graph for this function:

◆ sendPersonalDataFile()

ilObjUser::sendPersonalDataFile ( )

Send personal data file.

Parameters

return

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

5258 {
5259 include_once("./Services/Export/classes/class.ilExport.php");
5260 $file = ilExport::_getExportDirectory($this->getId(), "xml", "usr", "personal_data").
5261 "/".$this->getPersonalDataExportFile();
5262 if (is_file($file))
5263 {
5265 }
5266 }
getPersonalDataExportFile()
Get personal data export file.
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.

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

+ 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 @access 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 2116 of file class.ilObjUser.php.

2117 {
2118 $this->setOwner($a_owner);
2119
2120 if ($a_active)
2121 {
2122 $this->active = 1;
2123 $this->setApproveDate(date('Y-m-d H:i:s'));
2124 $this->setOwner($a_owner);
2125 }
2126 else
2127 {
2128 $this->active = 0;
2129 $this->setApproveDate(null);
2130 }
2131 }
setApproveDate($a_str)
set date the user account was activated null indicates that the user has not yet been activated @acce...
setOwner($a_owner)
set object owner

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

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

+ 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 @access public

Returns
void

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

2105 {
2106 $this->agree_date = $a_str;
2107 }

◆ setApproveDate()

ilObjUser::setApproveDate (   $a_str)

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

Returns
void

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

2074 {
2075 $this->approve_date = $a_str;
2076 }

Referenced by setActive().

+ Here is the caller graph for this function:

◆ setAuthMode()

ilObjUser::setAuthMode (   $a_str)

set auth mode @access public

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

3574 {
3575 $this->auth_mode = $a_str;
3576 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setBirthday()

ilObjUser::setBirthday (   $a_birthday)

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

5039 {
5040 if (strlen($a_birthday))
5041 {
5042 $date = new ilDate($a_birthday, IL_CAL_DATE);
5043 $this->birthday = $date->get(IL_CAL_DATE);
5044 }
5045 else
5046 {
5047 $this->birthday = null;
5048 }
5049 }
const IL_CAL_DATE
Class for single dates.

References IL_CAL_DATE.

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setCaptchaVerified()

ilObjUser::setCaptchaVerified (   $a_val)

Set captcha verified.

Parameters

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

5205 {
5206 $_SESSION["user_captcha_verified"] = $a_val;
5207 }

References $_SESSION.

◆ setCity()

ilObjUser::setCity (   $a_str)

set city @access public

Parameters
stringcity

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

1653 {
1654 $this->city = $a_str;
1655 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setClientIP()

ilObjUser::setClientIP (   $a_str)

set client ip number @access public

Parameters
stringclient ip

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

1808 {
1809 $this->client_ip = $a_str;
1810 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setComment()

ilObjUser::setComment (   $a_str)

set referral comment @access public

Parameters
stringhobby

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

2054 {
2055 $this->referral_comment = $a_str;
2056 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setCountry()

ilObjUser::setCountry (   $a_str)

Set country (free text)

@access public

Parameters
stringcountry

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

1692 {
1693 $this->country = $a_str;
1694 }

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

+ Here is the caller graph for this function:

◆ setCurrentLanguage()

ilObjUser::setCurrentLanguage (   $a_val)

Set current language.

Parameters
string$a_valcurrent language

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

2010 {
2011 $_SESSION['lang'] = $a_val;
2012 }

References $_SESSION.

◆ setDepartment()

ilObjUser::setDepartment (   $a_str)

set department @access public

Parameters
stringdepartment

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

1615 {
1616 $this->department = $a_str;
1617 }

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

+ Here is the caller graph for this function:

◆ setDesktopItemParameters()

ilObjUser::setDesktopItemParameters (   $a_item_id,
  $a_type,
  $a_par 
)

set parameters of a desktop item entry

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
string$a_parparameters

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

3033 {
3034 global $ilDB;
3035
3036 $ilDB->manipulateF("UPDATE desktop_item SET parameters = %s ".
3037 " WHERE item_id = %s AND type = %s AND user_id = %s",
3038 array("text", "integer", "text", "integer"),
3039 array($a_par, $a_item_id, $a_type, $this->getId()));
3040 }

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

+ Here is the call 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.

@access     public
@param      integer

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

1925 {
1926 $this->setPref("disk_quota",$a_disk_quota);
1927 }

References setPref().

+ Here is the call graph for this function:

◆ setEmail()

ilObjUser::setEmail (   $a_str)

set email @access public

Parameters
stringemail address

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

1863 {
1864 $this->email = $a_str;
1865 }

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

+ 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.

@access     public

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

3601 {
3602 $this->ext_account = $a_str;
3603 }

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

+ Here is the caller graph for this function:

◆ setFax()

ilObjUser::setFax (   $a_str)

set fax @access public

Parameters
stringfax

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

1789 {
1790 $this->fax = $a_str;
1791 }

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

+ Here is the caller graph for this function:

◆ setFirstname()

ilObjUser::setFirstname (   $a_str)

set firstname @access public

Parameters
stringfirstname

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

1558 {
1559 $this->firstname = $a_str;
1560 }

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

+ 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. @access static

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

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

1385 {
1386 $this->fullname = "";
1387
1388 if ($a_title)
1389 {
1390 $fullname = $a_title." ";
1391 }
1392 elseif ($this->utitle)
1393 {
1394 $this->fullname = $this->utitle." ";
1395 }
1396
1397 if ($a_firstname)
1398 {
1399 $fullname .= $a_firstname." ";
1400 }
1401 elseif ($this->firstname)
1402 {
1403 $this->fullname .= $this->firstname." ";
1404 }
1405
1406 if ($a_lastname)
1407 {
1408 return $fullname.$a_lastname;
1409 }
1410
1411 $this->fullname .= $this->lastname;
1412 }

References $fullname, and $lastname.

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setGender()

ilObjUser::setGender (   $a_str)

set gender @access public

Parameters
stringgender

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

1516 {
1517 $this->gender = substr($a_str,-1);
1518 }

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

+ Here is the caller graph for this function:

◆ setGeneralInterests()

ilObjUser::setGeneralInterests ( array  $value = null)

Set general interests.

Parameters
array$value

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

5518 {
5519 $this->interests_general = $value;
5520 }

Referenced by readMultiTextFields().

+ Here is the caller graph for this function:

◆ setHobby()

ilObjUser::setHobby (   $a_str)
set hobby
@access     public
Parameters
stringhobby

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

1882 {
1883 $this->hobby = $a_str;
1884 }

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

+ Here is the caller graph for this function:

◆ setInactivationDate()

ilObjUser::setInactivationDate (   $inactivation_date)

setter for inactivation date

Parameters
string$inactivationDate

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

5352 {
5353 $this->inactivation_date = $inactivation_date;
5354 }

References $inactivation_date.

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setInstitution()

ilObjUser::setInstitution (   $a_str)

set institution @access public

Parameters
stringinstitution

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

1596 {
1597 $this->institution = $a_str;
1598 }

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

+ Here is the caller graph for this function:

◆ setIsSelfRegistered()

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

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

5498 {
5499 $this->is_self_registered = (bool) $status;
5500 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setLanguage()

ilObjUser::setLanguage (   $a_str)

set user language @access public

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

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

1901 {
1902 $this->setPref("language",$a_str);
1903 unset($_SESSION['lang']);
1904 }

References $_SESSION, and setPref().

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

+ 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 @access public

Parameters
stringlogin date

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

2020 {
2021 $this->last_login = $a_str;
2022 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setLastname()

ilObjUser::setLastname (   $a_str)

set lastame @access public

Parameters
stringlastname

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

1577 {
1578 $this->lastname = $a_str;
1579 }

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

+ Here is the caller graph for this function:

◆ setLastPasswordChangeToNow()

ilObjUser::setLastPasswordChangeToNow ( )

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

2359 {
2360 global $ilDB;
2361
2362 $this->setLastPasswordChangeTS( time() );
2363
2364 $query = "UPDATE usr_data SET last_password_change = %s " .
2365 "WHERE usr_id = %s";
2366 $affected = $ilDB->manipulateF($query,
2367 array('integer','integer'),
2368 array($this->getLastPasswordChangeTS(),$this->id));
2369 if($affected) return true;
2370 else return false;
2371 }

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

+ Here is the call graph for this function:

◆ setLastPasswordChangeTS()

ilObjUser::setLastPasswordChangeTS (   $a_last_password_change_ts)

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

1949 {
1950 $this->last_password_change_ts = $a_last_password_change_ts;
1951 }

Referenced by read(), and setLastPasswordChangeToNow().

+ Here is the caller graph for this function:

◆ setLastUpdate()

ilObjUser::setLastUpdate (   $a_str)

set last update of user data set @access public

Parameters
stringdate

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

2040 {
2041 $this->last_update = $a_str;
2042 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setLatitude()

ilObjUser::setLatitude (   $a_latitude)

Set Latitude.

Parameters
string$a_latitudeLatitude

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

2391 {
2392 $this->latitude = $a_latitude;
2393 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setLocationZoom()

ilObjUser::setLocationZoom (   $a_locationzoom)

Set Location Zoom.

Parameters
int$a_locationzoomLocation Zoom

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

2431 {
2432 $this->loc_zoom = $a_locationzoom;
2433 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setLogin()

ilObjUser::setLogin (   $a_str)

set login / username @access public

Parameters
stringusername

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

1464 {
1465 $this->login = $a_str;
1466 }

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

+ Here is the caller graph for this function:

◆ setLoginAttempts()

ilObjUser::setLoginAttempts (   $a_login_attempts)

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

2253 {
2254 $this->login_attempts = $a_login_attempts;
2255 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setLongitude()

ilObjUser::setLongitude (   $a_longitude)

Set Longitude.

Parameters
string$a_longitudeLongitude

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

2411 {
2412 $this->longitude = $a_longitude;
2413 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setLookingForHelp()

ilObjUser::setLookingForHelp ( array  $value = null)

Set help looking for.

Parameters
array$value

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

5578 {
5579 $this->interests_help_looking = $value;
5580 }

Referenced by readMultiTextFields().

+ Here is the caller graph for this function:

◆ setMatriculation()

ilObjUser::setMatriculation (   $a_str)

set matriculation number @access public

Parameters
stringmatriculation number

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

1827 {
1828 $this->matriculation = $a_str;
1829 }

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

+ Here is the caller graph for this function:

◆ setOfferingHelp()

ilObjUser::setOfferingHelp ( array  $value = null)

Set help offering.

Parameters
array$value

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

5548 {
5549 $this->interests_help_offered = $value;
5550 }

Referenced by readMultiTextFields().

+ Here is the caller graph for this function:

◆ setPasswd()

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

set password @access public

Parameters
stringpasswd

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

1483 {
1484 $this->passwd = $a_str;
1485 $this->passwd_type = $a_type;
1486 }

References $a_type.

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

+ Here is the caller graph for this function:

◆ setPasswordEncodingType()

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

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

305 {
306 $this->password_encoding_type = $password_encryption_type;
307 }

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

+ Here is the caller graph for this function:

◆ setPasswordSalt()

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

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

321 {
322 $this->password_salt = $password_salt;
323 }

References $password_salt.

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

+ Here is the caller graph for this function:

◆ setPhoneHome()

ilObjUser::setPhoneHome (   $a_str)

set home phone @access public

Parameters
stringhome phone

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

1751 {
1752 $this->phone_home = $a_str;
1753 }

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

+ Here is the caller graph for this function:

◆ setPhoneMobile()

ilObjUser::setPhoneMobile (   $a_str)

set mobile phone @access public

Parameters
stringmobile phone

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

1770 {
1771 $this->phone_mobile = $a_str;
1772 }

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

+ Here is the caller graph for this function:

◆ setPhoneOffice()

ilObjUser::setPhoneOffice (   $a_str)

set office phone @access public

Parameters
stringoffice phone

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

1732 {
1733 $this->phone_office = $a_str;
1734 }

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

+ Here is the caller graph for this function:

◆ setPref()

ilObjUser::setPref (   $a_keyword,
  $a_value 
)

set a user preference

Parameters
stringname of parameter
stringvalue @access public

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

1179 {
1180 if ($a_keyword != "")
1181 {
1182 $this->prefs[$a_keyword] = $a_value;
1183 }
1184 }

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

+ Here is the caller graph for this function:

◆ setProfileIncomplete()

ilObjUser::setProfileIncomplete (   $a_prof_inc)

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

2276 {
2277 $this->profile_incomplete = (boolean) $a_prof_inc;
2278 }

Referenced by assignData().

+ 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 1711 of file class.ilObjUser.php.

1712 {
1713 $this->sel_country = $a_val;
1714 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setSkin()

ilObjUser::setSkin (   $a_str)

set user skin (template set) @access public

Parameters
stringdirectory name of template set

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

2206 {
2207 // TODO: exception handling (dir exists)
2208 $this->skin = $a_str;
2209 }

◆ setStreet()

ilObjUser::setStreet (   $a_str)

set street @access public

Parameters
stringstreet

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

1634 {
1635 $this->street = $a_str;
1636 }

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

+ Here is the caller graph for this function:

◆ setTimeLimitFrom()

ilObjUser::setTimeLimitFrom (   $a_from)

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

2220 {
2221 $this->time_limit_from = $a_from;
2222 }

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

+ Here is the caller graph for this function:

◆ setTimeLimitMessage()

ilObjUser::setTimeLimitMessage (   $a_time_limit_message)

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

2244 {
2245 return $this->time_limit_message = $a_time_limit_message;
2246 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setTimeLimitOwner()

ilObjUser::setTimeLimitOwner (   $a_owner)

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

2212 {
2213 $this->time_limit_owner = $a_owner;
2214 }

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

+ Here is the caller graph for this function:

◆ setTimeLimitUnlimited()

ilObjUser::setTimeLimitUnlimited (   $a_unlimited)

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

2236 {
2237 $this->time_limit_unlimited = $a_unlimited;
2238 }

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

+ Here is the caller graph for this function:

◆ setTimeLimitUntil()

ilObjUser::setTimeLimitUntil (   $a_until)

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

2228 {
2229 $this->time_limit_until = $a_until;
2230 }

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

+ Here is the caller graph for this function:

◆ setUserDefinedData()

ilObjUser::setUserDefinedData (   $a_data)

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

4031 {
4032 if(!is_array($a_data))
4033 {
4034 return false;
4035 }
4036 foreach($a_data as $field => $data)
4037 {
4038 #$new_data[$field] = ilUtil::stripSlashes($data);
4039 // Assign it directly to avoid update problems of unchangable fields
4040 $this->user_defined_data['f_'.$field] = $data;
4041 }
4042 #$this->user_defined_data = $new_data;
4043
4044 return true;
4045 }

References $data.

◆ 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) @access public

Parameters
stringtitle

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

1537 {
1538 $this->utitle = $a_str;
1539 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setZipcode()

ilObjUser::setZipcode (   $a_str)

set zipcode @access public

Parameters
stringzipcode

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

1672 {
1673 $this->zipcode = $a_str;
1674 }

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

+ 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 @access public

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

2166 {
2167 global $ilAuth;
2168
2169 $storedActive = 0;
2170 if ($this->getStoredActive($this->id))
2171 {
2172 $storedActive = 1;
2173 }
2174
2175 $currentActive = 0;
2176 if ($this->active)
2177 {
2178 $currentActive = 1;
2179 }
2180
2181 if ((!empty($storedActive) && empty($currentActive)) ||
2182 (empty($storedActive) && !empty($currentActive)))
2183 {
2184 $this->setActive($currentActive, self::getUserIdByLogin(ilObjUser::getLoginFromAuth()));
2185 }
2186 }
getStoredActive($a_id)
get user active state
setActive($a_active, $a_owner=0)
set user active state and updates system fields appropriately @access public

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

+ Here is the call 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 2506 of file class.ilObjUser.php.

2507 {
2508 // Remove all characters including the last slash or the last backslash
2509 // in the username
2510 $pos = strrpos($a_login, '/');
2511 $pos2 = strrpos($a_login, '\\');
2512 if ($pos === false || $pos < $pos2)
2513 {
2514 $pos = $pos2;
2515 }
2516 if ($pos !== false)
2517 {
2518 $a_login = substr($a_login, $pos + 1);
2519 }
2520 return $a_login;
2521 }

Referenced by getLoginFromAuth().

+ Here is the caller graph for this function:

◆ updateLogin()

ilObjUser::updateLogin (   $a_login)

update login name

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

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

939 {
940 global $ilDB, $ilSetting;
941
942 if(func_num_args() != 1)
943 {
944 return false;
945 }
946
947 if(!isset($a_login))
948 {
949 return false;
950 }
951
952 $former_login = self::_lookupLogin($this->getId());
953
954 // Update not necessary
955 if(0 == strcmp($a_login, $former_login))
956 {
957 return false;
958 }
959
960 try
961 {
962 $last_history_entry = ilObjUser::_getLastHistoryDataByUserId($this->getId());
963 }
964 catch(ilUserException $e) { $last_history_entry = null; }
965
966 // throw exception if the desired loginame is already in history and it is not allowed to reuse it
967 if((int)$ilSetting->get('allow_change_loginname') &&
968 (int)$ilSetting->get('reuse_of_loginnames') == 0 &&
969 self::_doesLoginnameExistInHistory($a_login))
970 {
971 throw new ilUserException($this->lng->txt('loginname_already_exists'));
972 }
973 else if((int)$ilSetting->get('allow_change_loginname') &&
974 (int)$ilSetting->get('loginname_change_blocking_time') &&
975 is_array($last_history_entry) &&
976 $last_history_entry[1] + (int)$ilSetting->get('loginname_change_blocking_time') > time())
977 {
978 include_once 'Services/Calendar/classes/class.ilDate.php';
979 throw new ilUserException(
980 sprintf(
981 $this->lng->txt('changing_loginname_not_possible_info'),
983 new ilDateTime($last_history_entry[1], IL_CAL_UNIX)),
985 new ilDateTime(($last_history_entry[1] + (int)$ilSetting->get('loginname_change_blocking_time')), IL_CAL_UNIX))
986 )
987 );
988 }
989 else
990 {
991 // log old loginname in history
992 if((int)$ilSetting->get('allow_change_loginname') &&
993 (int)$ilSetting->get('create_history_loginname'))
994 {
995 ilObjUser::_writeHistory($this->getId(), $former_login);
996 }
997
998 //update login
999 $this->login = $a_login;
1000
1001 $ilDB->manipulateF('
1002 UPDATE usr_data
1003 SET login = %s
1004 WHERE usr_id = %s',
1005 array('text', 'integer'), array($this->getLogin(), $this->getId()));
1006 }
1007
1008 return true;
1009 }
sprintf('%.4f', $callTime)
const IL_CAL_UNIX
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
static _getLastHistoryDataByUserId($a_usr_id)
Returns the last used loginname and the changedate of the passed user_id.
static _writeHistory($a_usr_id, $a_login)

References $ilDB, $ilSetting, _getLastHistoryDataByUserId(), _lookupLogin(), _writeHistory(), ilDatePresentation\formatDate(), ilObject\getId(), getLogin(), IL_CAL_UNIX, and sprintf.

+ 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 5669 of file class.ilObjUser.php.

5670 {
5671 global $ilDB;
5672
5673 if(!$this->getId())
5674 {
5675 return;
5676 }
5677
5678 if(!$a_create)
5679 {
5680 $this->deleteMultiTextFields();
5681 }
5682
5683 $map = array(
5684 "interests_general" => $this->getGeneralInterests(),
5685 "interests_help_offered" => $this->getOfferingHelp(),
5686 "interests_help_looking" => $this->getLookingForHelp()
5687 );
5688
5689 foreach($map as $id => $values)
5690 {
5691 if(is_array($values) && sizeof($values))
5692 {
5693 foreach($values as $value)
5694 {
5695 $value = trim($value);
5696 if($value)
5697 {
5698 $uniq_id = $ilDB->nextId('usr_data_multi');
5699
5700 $ilDB->manipulate("INSERT usr_data_multi".
5701 " (id,usr_id,field_id,value) VALUES".
5702 " (".$ilDB->quote($uniq_id, "integer").
5703 ",".$ilDB->quote($this->getId(), "integer").
5704 ",".$ilDB->quote($id, "text").
5705 ",".$ilDB->quote($value, "text").
5706 ")");
5707 }
5708 }
5709 }
5710 }
5711 }
getGeneralInterests()
Get general interests.
getOfferingHelp()
Get help offering.
getLookingForHelp()
Get help looking for.

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

+ Here is the call graph for this function:

◆ updateUserDefinedFields()

ilObjUser::updateUserDefinedFields ( )

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

4053 {
4054 global $ilDB;
4055
4056 $fields = '';
4057
4058 $field_def = array();
4059
4060 include_once("./Services/User/classes/class.ilUserDefinedData.php");
4061 $udata = new ilUserDefinedData($this->getId());
4062
4063 foreach($this->user_defined_data as $field => $value)
4064 {
4065 if($field != 'usr_id')
4066 {
4067// $field_def[$field] = array('text',$value);
4068 $udata->set($field, $value);
4069 }
4070 }
4071 $udata->update();
4072
4073/* if(!$field_def)
4074 {
4075 return true;
4076 }
4077
4078 $query = "SELECT usr_id FROM udf_data WHERE usr_id = ".$ilDB->quote($this->getId(),'integer');
4079 $res = $ilDB->query($query);
4080
4081
4082 if($res->numRows())
4083 {
4084 // Update
4085 $ilDB->update('udf_data',$field_def,array('usr_id' => array('integer',$this->getId())));
4086 }
4087 else
4088 {
4089 $field_def['usr_id'] = array('integer',$this->getId());
4090 $ilDB->insert('udf_data',$field_def);
4091 }
4092*/
4093 return true;
4094 }

References $ilDB, and ilObject\getId().

+ Here is the call graph for this function:

◆ userExists()

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

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

5179 {
5180 global $ilDB;
5181
5182 $query = 'SELECT count(*) num FROM object_data od '.
5183 'JOIN usr_data ud ON obj_id = usr_id '.
5184 'WHERE '.$ilDB->in('obj_id',$a_usr_ids,false,'integer').' ';
5185 $res = $ilDB->query($query);
5186 $num_rows =$res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)->num;
5187 return $num_rows == count((array) $a_usr_ids);
5188 }

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

Referenced by ilInfoScreenGUI\addObjectSections().

+ Here is the caller graph for this function:

◆ writeAccepted()

ilObjUser::writeAccepted ( )

write accept date of user agreement to db

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

656 {
657 global $ilDB;
658
659 $ilDB->manipulateF("UPDATE usr_data SET agree_date = ".$ilDB->now().
660 " WHERE usr_id = %s", array("integer"), array($this->getId()));
661 }

References $ilDB, and ilObject\getId().

Referenced by ilTermsOfServiceHelper\trackAcceptance().

+ 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 @access private

Parameters
stringkeyword
stringvalue

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

1018 {
1019 self::_writePref($this->id, $a_keyword, $a_value);
1020 $this->setPref($a_keyword, $a_value);
1021 }

References _writePref(), and setPref().

Referenced by activateDeletionFlag(), and removeDeletionFlag().

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

◆ writePrefs()

ilObjUser::writePrefs ( )

write all userprefs @access private

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

1102 {
1103 global $ilDB;
1104
1105 ilObjUser::_deleteAllPref($this->id);
1106 foreach ($this->prefs as $keyword => $value)
1107 {
1108 self::_writePref($this->id, $keyword, $value);
1109 }
1110 }

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

+ Here is the call graph for this function:

Field Documentation

◆ $active

◆ $agree_date

ilObjUser::$agree_date = null

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

Referenced by getAgreeDate().

◆ $approve_date

ilObjUser::$approve_date = null

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

Referenced by getApproveDate().

◆ $auth_mode

ilObjUser::$auth_mode

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

Referenced by getAuthMode().

◆ $birthday

ilObjUser::$birthday
protected

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

Referenced by getBirthday().

◆ $city

ilObjUser::$city

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

Referenced by getCity().

◆ $client_ip

ilObjUser::$client_ip

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

Referenced by getClientIP().

◆ $country

ilObjUser::$country

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

Referenced by getCountry().

◆ $default_role

ilObjUser::$default_role

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

◆ $department

ilObjUser::$department

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

Referenced by getDepartment().

◆ $email

ilObjUser::$email

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

Referenced by getEmail().

◆ $fax

ilObjUser::$fax

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

Referenced by getFax().

◆ $firstname

ilObjUser::$firstname

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

Referenced by getFirstname().

◆ $fullname

ilObjUser::$fullname

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

Referenced by _lookupFullname(), and setFullname().

◆ $gender

ilObjUser::$gender

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

Referenced by getGender().

◆ $hobby

ilObjUser::$hobby

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

Referenced by getHobby().

◆ $ilias

ilObjUser::$ilias

◆ $inactivation_date

ilObjUser::$inactivation_date = null
protected

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

Referenced by getInactivationDate(), and setInactivationDate().

◆ $institution

ilObjUser::$institution

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

Referenced by getInstitution().

◆ $interests_general

ilObjUser::$interests_general
protected

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

Referenced by getGeneralInterests().

◆ $interests_help_looking

ilObjUser::$interests_help_looking
protected

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

Referenced by getLookingForHelp().

◆ $interests_help_offered

ilObjUser::$interests_help_offered
protected

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

Referenced by getOfferingHelp().

◆ $is_desktop_item_cache

ilObjUser::$is_desktop_item_cache
static

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

◆ $is_desktop_item_loaded

ilObjUser::$is_desktop_item_loaded
static

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

◆ $is_self_registered

ilObjUser::$is_self_registered = false
private

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

Referenced by isSelfRegistered().

◆ $last_password_change_ts

ilObjUser::$last_password_change_ts

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

Referenced by getLastPasswordChangeTS().

◆ $lastname

ilObjUser::$lastname

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

Referenced by getLastname(), and setFullname().

◆ $latitude

ilObjUser::$latitude

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

Referenced by getLatitude().

◆ $loc_zoom

ilObjUser::$loc_zoom

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

Referenced by getLocationZoom().

◆ $login

ilObjUser::$login

all user related data in single vars @access public

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

Referenced by checkUserId(), getLogin(), getLoginByUserId(), getLoginFromAuth(), isCurrentUserActive(), and shibUser\returnNewLoginName().

◆ $login_attempts

ilObjUser::$login_attempts

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

Referenced by _getLoginAttempts(), and getLoginAttempts().

◆ $longitude

ilObjUser::$longitude

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

Referenced by getLongitude().

◆ $matriculation

ilObjUser::$matriculation

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

Referenced by getMatriculation().

◆ $org_units

ilObjUser::$org_units
protected

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

◆ $passwd

ilObjUser::$passwd
protected

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

Referenced by getPasswd().

◆ $passwd_type

ilObjUser::$passwd_type
protected

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

Referenced by getPasswdType().

◆ $password_encoding_type

ilObjUser::$password_encoding_type
protected

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

Referenced by getPasswordEncodingType().

◆ $password_salt

ilObjUser::$password_salt = null
protected

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

Referenced by getPasswordSalt(), and setPasswordSalt().

◆ $personal_image_cache

ilObjUser::$personal_image_cache = array()
staticprotected

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

◆ $phone_home

ilObjUser::$phone_home

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

Referenced by getPhoneHome().

◆ $phone_mobile

ilObjUser::$phone_mobile

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

Referenced by getPhoneMobile().

◆ $phone_office

ilObjUser::$phone_office

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

Referenced by getPhoneOffice().

◆ $prefs

ilObjUser::$prefs

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

Referenced by _getPreferences(), and readPrefs().

◆ $referral_comment

ilObjUser::$referral_comment

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

Referenced by getComment().

◆ $sel_country

ilObjUser::$sel_country

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

Referenced by getSelectedCountry().

◆ $skin

ilObjUser::$skin

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

Referenced by __construct().

◆ $street

ilObjUser::$street

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

Referenced by getStreet().

◆ $user_defined_data

ilObjUser::$user_defined_data = array()

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

◆ $utitle

ilObjUser::$utitle

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

Referenced by getUTitle().

◆ $zipcode

ilObjUser::$zipcode

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

Referenced by getZipcode().


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