ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObjUser Class Reference
+ Inheritance diagram for ilObjUser:
+ Collaboration diagram for ilObjUser:

Public Member Functions

 __construct ($a_user_id=0, $a_call_by_reference=false)
 Constructor public. More...
 
 read ()
 loads a record "user" from database private More...
 
 getPasswordEncodingType ()
 
 setPasswordEncodingType ($password_encryption_type)
 
 getPasswordSalt ()
 
 setPasswordSalt ($password_salt)
 
 assignData ($a_data)
 loads a record "user" from array public More...
 
 writeAccepted ()
 write accept date of user agreement to db More...
 
 refreshLogin ()
 updates the login data of a "user" // TODO set date with now() should be enough public More...
 
 updateLogin ($a_login)
 update login name More...
 
 writePref ($a_keyword, $a_value)
 write userpref to user table private More...
 
 deletePref ($a_keyword)
 Deletes a userpref value of the user from the database public. More...
 
 writePrefs ()
 write all userprefs private More...
 
 getTimeZone ()
 get timezone of user More...
 
 getTimeFormat ()
 get time format More...
 
 getDateFormat ()
 get date format More...
 
 setPref ($a_keyword, $a_value)
 set a user preference More...
 
 getPref ($a_keyword)
 get a user preference More...
 
 readPrefs ()
 get all user preferences private More...
 
 delete ()
 deletes a user public More...
 
 setFullname ($a_title="", $a_firstname="", $a_lastname="")
 builds a string with title + firstname + lastname method is used to build fullname in member variable $this->fullname. More...
 
 getFullname ($a_max_strlen=0)
 get fullname public More...
 
 setLogin ($a_str)
 set login / username public More...
 
 getLogin ()
 get login / username public More...
 
 setPasswd ($a_str, $a_type=IL_PASSWD_PLAIN)
 set password public More...
 
 getPasswd ()
 get password More...
 
 getPasswdType ()
 get password type More...
 
 setGender ($a_str)
 set gender public More...
 
 getGender ()
 get gender public More...
 
 setUTitle ($a_str)
 set user title (note: don't mix up this method with setTitle() that is derived from ilObject and sets the user object's title) public More...
 
 getUTitle ()
 get user title (note: don't mix up this method with getTitle() that is derived from ilObject and gets the user object's title) public More...
 
 setFirstname ($a_str)
 set firstname public More...
 
 getFirstname ()
 get firstname public More...
 
 setLastname ($a_str)
 set lastame public More...
 
 getLastname ()
 get lastname public More...
 
 setInstitution ($a_str)
 set institution public More...
 
 getInstitution ()
 get institution public More...
 
 setDepartment ($a_str)
 set department public More...
 
 getDepartment ()
 get department public More...
 
 setStreet ($a_str)
 set street public More...
 
 getStreet ()
 get street public More...
 
 setCity ($a_str)
 set city public More...
 
 getCity ()
 get city public More...
 
 setZipcode ($a_str)
 set zipcode public More...
 
 getZipcode ()
 get zipcode public More...
 
 setCountry ($a_str)
 Set country (free text) More...
 
 getCountry ()
 Get country (free text) More...
 
 setSelectedCountry ($a_val)
 Set selected country (selection drop down) More...
 
 getSelectedCountry ()
 Get selected country (selection drop down) More...
 
 setPhoneOffice ($a_str)
 set office phone public More...
 
 getPhoneOffice ()
 get office phone public More...
 
 setPhoneHome ($a_str)
 set home phone public More...
 
 getPhoneHome ()
 get home phone public More...
 
 setPhoneMobile ($a_str)
 set mobile phone public More...
 
 getPhoneMobile ()
 get mobile phone public More...
 
 setFax ($a_str)
 set fax public More...
 
 getFax ()
 get fax public More...
 
 setClientIP ($a_str)
 set client ip number public More...
 
 getClientIP ()
 get client ip number public More...
 
 setMatriculation ($a_str)
 set matriculation number public More...
 
 getMatriculation ()
 get matriculation number public More...
 
 setEmail ($a_str)
 set email public More...
 
 getEmail ()
 get email address public More...
 
 getSecondEmail ()
 
 setSecondEmail ($second_email)
 
 setHobby ($a_str)
 set hobby public More...
 
 getHobby ()
 get hobby public More...
 
 setLanguage ($a_str)
 set user language public More...
 
 getLanguage ()
 returns a 2char-language-string public More...
 
 setDiskQuota ($a_disk_quota)
 Sets the minimal disk quota imposed by this user account. More...
 
 getDiskQuota ()
 Returns the minimal disk quota imposed by this user account. More...
 
 getPersonalWorkspaceDiskQuota ()
 
 setLastPasswordChangeTS ($a_last_password_change_ts)
 
 getLastPasswordChangeTS ()
 
 getCurrentLanguage ()
 returns the current language (may differ from user's pref setting!) More...
 
 setCurrentLanguage ($a_val)
 Set current language. More...
 
 setLastLogin ($a_str)
 set user's last login public More...
 
 getLastLogin ()
 returns last login date public More...
 
 setLastUpdate ($a_str)
 set last update of user data set public More...
 
 getLastUpdate ()
 
 setComment ($a_str)
 set referral comment public More...
 
 getComment ()
 get referral comment public More...
 
 setApproveDate ($a_str)
 set date the user account was activated null indicates that the user has not yet been activated public More...
 
 getApproveDate ()
 get the date when the user account was approved public More...
 
 getAgreeDate ()
 get the date when the user accepted the user agreement public More...
 
 setAgreeDate ($a_str)
 set date the user account was accepted by the user nullindicates that the user has not accepted his account public More...
 
 setActive ($a_active, $a_owner=0)
 set user active state and updates system fields appropriately public More...
 
 getActive ()
 get user active state public More...
 
 syncActive ()
 synchronizes current and stored user active values for the owner value to be set correctly, this function should only be called when an admin is approving a user account public More...
 
 getStoredActive ($a_id)
 get user active state More...
 
 setSkin ($a_str)
 set user skin (template set) public More...
 
 setTimeLimitOwner ($a_owner)
 
 getTimeLimitOwner ()
 
 setTimeLimitFrom ($a_from)
 
 getTimeLimitFrom ()
 
 setTimeLimitUntil ($a_until)
 
 getTimeLimitUntil ()
 
 setTimeLimitUnlimited ($a_unlimited)
 
 getTimeLimitUnlimited ()
 
 setTimeLimitMessage ($a_time_limit_message)
 
 getTimeLimitMessage ()
 
 setLoginAttempts ($a_login_attempts)
 
 getLoginAttempts ()
 
 checkTimeLimit ()
 
 setProfileIncomplete ($a_prof_inc)
 
 getProfileIncomplete ()
 
 isPasswordChangeDemanded ()
 
 isPasswordExpired ()
 
 getPasswordAge ()
 
 setLastPasswordChangeToNow ()
 
 resetLastPasswordChange ()
 
 setLatitude ($a_latitude)
 Set Latitude. More...
 
 getLatitude ()
 Get Latitude. More...
 
 setLongitude ($a_longitude)
 Set Longitude. More...
 
 getLongitude ()
 Get Longitude. More...
 
 setLocationZoom ($a_locationzoom)
 Set Location Zoom. More...
 
 getLocationZoom ()
 Get Location Zoom. More...
 
 checkUserId ()
 
 isCurrentUserActive ()
 
 getLoginByUserId ($a_userid)
 
 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 public More...
 
 getAuthMode ($a_auth_key=false)
 get auth mode public More...
 
 setExternalAccount ($a_str)
 set external account More...
 
 getExternalAccount ()
 get external account More...
 
 getPersonalPicturePath ($a_size="small", $a_force_pic=false)
 Get path to personal picture. More...
 
 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 public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ()
 read object data from db into object More...
 
 getId ()
 get object id public More...
 
 setId ($a_id)
 set object id public More...
 
 setRefId ($a_id)
 set reference id public More...
 
 getRefId ()
 get reference id public More...
 
 getType ()
 get object type public More...
 
 setType ($a_type)
 set object type public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title public More...
 
 getUntranslatedTitle ()
 get untranslated object title public More...
 
 setTitle ($a_title)
 set object title More...
 
 getDescription ()
 get object description More...
 
 setDescription ($a_desc)
 set object description More...
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 get import id More...
 
 setImportId ($a_import_id)
 set import id More...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date public More...
 
 getLastUpdateDate ()
 get last update date public More...
 
 getDiskUsage ()
 Gets the disk usage of the object in bytes. More...
 
 create ()
 create More...
 
 update ()
 update object in db More...
 
 MDUpdateListener ($a_element)
 Meta data update listener. More...
 
 createMetaData ()
 create meta data entry More...
 
 updateMetaData ()
 update meta data entry More...
 
 deleteMetaData ()
 delete meta data entry More...
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 setParentRolePermissions ($a_parent_ref)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 getPossibleSubObjects ($a_filter=true)
 get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static _lookupFullname ($a_user_id)
 Lookup Full Name. More...
 
static _lookupEmail ($a_user_id)
 Lookup email. More...
 
static _lookupSecondEmail ($a_user_id)
 Lookup second e-mail. More...
 
static _lookupGender ($a_user_id)
 Lookup gender. More...
 
static _lookupClientIP ($a_user_id)
 Lookup client ip. More...
 
static _lookupName ($a_user_id)
 lookup user name More...
 
static _lookupFields ($a_user_id)
 lookup fields (deprecated; use more specific methods instead) More...
 
static _lookupLogin ($a_user_id)
 lookup login More...
 
static _lookupExternalAccount ($a_user_id)
 lookup external account for login and authmethod More...
 
static _lookupId ($a_user_str)
 Lookup id by login. More...
 
static _lookupLastLogin ($a_user_id)
 lookup last login More...
 
static _doesLoginnameExistInHistory ($a_login)
 Checks wether the passed loginname already exists in history. More...
 
static _getLastHistoryDataByUserId ($a_usr_id)
 Returns the last used loginname and the changedate of the passed user_id. More...
 
static _deleteAllPref ($a_user_id)
 Deletes a userpref value of the user from the database public. More...
 
static _writePref ($a_usr_id, $a_keyword, $a_value)
 
static _lookupPref ($a_usr_id, $a_keyword)
 
static lookupMatriculation ($a_usr_id)
 Lookup matriculation. More...
 
static _lookupLanguage ($a_usr_id)
 
static _writeExternalAccount ($a_usr_id, $a_ext_id)
 
static _writeAuthMode ($a_usr_id, $a_auth_mode)
 
static _lookupActive ($a_usr_id)
 Check user account active. More...
 
static hasActiveSession ($a_user_id, $a_session_id)
 Check for simultaneous login. More...
 
static toUsernameWithoutDomain ($a_login)
 Static function removes Microsoft domain name from username webdav related. More...
 
static getUserIdByLogin ($a_login)
 
static _getUserIdsByEmail ($a_email)
 STATIC METHOD get all user_ids of an email address. More...
 
 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 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, $tryFallback=true)
 check whether external account and authentication method matches with a user More...
 
static _getNumberOfUsersPerAuthMode ()
 get number of users per auth mode More...
 
static _getLocalAccountsForEmail ($a_email)
 check whether external account and authentication method matches with a user More...
 
static _uploadPersonalPicture ($tmp_file, $obj_id)
 Create a personal picture image file from a temporary image file. More...
 
static copyProfilePicturesToDirectory ($a_user_id, $a_dir)
 Get profile picture direcotory. More...
 
static _lookupFeedHash ($a_user_id, $a_create=false)
 Lookup news feed hash for user. More...
 
static _getFeedPass ($a_user_id)
 Lookup news feed password for user. More...
 
static _setFeedPass ($a_user_id, $a_password)
 Set news feed password for user. More...
 
static _loginExists ($a_login, $a_user_id=0)
 check if a login name already exists You may exclude a user from the check by giving his user id as 2nd paramter public static More...
 
static _externalAccountExists ($a_external_account, $a_auth_mode)
 Check if an external account name already exists. More...
 
static _getUsersForRole ($role_id, $active=-1)
 return array of complete users which belong to a specific role More...
 
static _getUsersForFolder ($ref_id, $active)
 get users for a category or from system folder More...
 
static _getUsersForGroup ($a_mem_ids, $active=-1)
 return user data for group members More...
 
static _getUsersForIds ($a_mem_ids, $active=-1, $timelimitowner=-1)
 return user data for given user id More...
 
static _getUserData ($a_internalids)
 return user data for given user ids More...
 
static _getPreferences ($user_id)
 get preferences for user More...
 
static getUserSubsetByPreferenceValue ($a_user_ids, $a_keyword, $a_val)
 For a given set of user IDs return a subset that has a given user preference set. More...
 
static _resetLoginAttempts ($a_usr_id)
 
static _getLoginAttempts ($a_usr_id)
 
static _incrementLoginAttempts ($a_usr_id)
 
static _setUserInactive ($a_usr_id)
 
static _writeHistory ($a_usr_id, $a_login)
 
static _getAssociatedUsersOnline ($a_user_id, $a_no_anonymous=false)
 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. More...
 
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 getProfileStatusOfUsers ($a_user_ids)
 Get profile status. More...
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId ($a_import_id)
 
static _lookupImportId ($a_obj_id)
 
static _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id More...
 
static _getIdForImportId ($a_import_id)
 get current object id for import id (static) More...
 
static _getAllReferences ($a_id)
 get all reference ids of object More...
 
static _lookupTitle ($a_id)
 lookup object title More...
 
static _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 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 More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection. More...
 
static _getIcon ( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $a_obj_ids)
 Get long description data. More...
 
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns. More...
 
static fixMissingTitles ($a_type, array &$a_obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate ($a_id)
 Lookup creation date. More...
 
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course. More...
 

Data Fields

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

Static Public Attributes

static $is_desktop_item_loaded
 
static $is_desktop_item_cache
 

Protected Member Functions

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

Protected Attributes

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

Static Protected Attributes

static $personal_image_cache = array()
 

Static Private Member Functions

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

Private Attributes

 $is_self_registered = false
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor public.

Parameters
integeruser_id

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

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

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

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

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

2968  {
2969  global $ilDB;
2970 
2971  $item_set = $ilDB->queryF(
2972  "SELECT * FROM desktop_item WHERE " .
2973  "item_id = %s AND type = %s AND user_id = %s",
2974  array("integer", "text", "integer"),
2975  array($a_item_id, $a_type, $a_usr_id)
2976  );
2977 
2978  // only insert if item is not already on desktop
2979  if (!$ilDB->fetchAssoc($item_set)) {
2980  $ilDB->manipulateF(
2981  "INSERT INTO desktop_item (item_id, type, user_id, parameters) VALUES " .
2982  " (%s,%s,%s,%s)",
2983  array("integer", "text", "integer", "text"),
2984  array($a_item_id,$a_type,$a_usr_id,$a_par)
2985  );
2986  }
2987 
2988  include_once './Services/Calendar/classes/class.ilCalendarCategories.php';
2990  }
static deletePDItemsCache($a_usr_id)
Delete cache (add remove desktop item)
$a_type
Definition: workflow.php:92
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _checkExternalAuthAccount()

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

check whether external account and authentication method matches with a user

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

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

Referenced by ilSoapAuthentication\__checkAgreement(), ilSoapAuthenticationCAS\authenticate(), ilAuthProviderCAS\doAuthentication(), ilAuthProviderRadius\doAuthentication(), ilAuthProviderApache\doAuthentication(), ilLTIAppEventListener\doCronUpdate(), ilAuthContainerSOAP\fetchData(), ilAuthProviderLTI\findUserId(), ilAuthContainerApache\forceCreation(), ilAuthProviderSaml\handleSamlAuth(), ilUserImportParser\importEndTag(), ilCASAuth\login(), ilAuthContainerCAS\loginObserver(), ilLDAPUserSynchronisation\readInternalAccount(), ilLDAPQuery\readUserData(), ilECSCmsCourseMemberCommandQueueHandler\refreshAssignmentStatus(), ilObjUserTest\testAuthAndEmailMethods(), ilAuthContainerApache\updateRequired(), and ilUserImportParser\verifyEndTag().

3693  {
3694  $db = $GLOBALS['DIC']->database();
3695  $settings = $GLOBALS['DIC']->settings();
3696 
3697  // Check directly with auth_mode
3698  $r = $db->queryF(
3699  "SELECT * FROM usr_data WHERE " .
3700  " ext_account = %s AND auth_mode = %s",
3701  array("text", "text"),
3702  array($a_account, $a_auth)
3703  );
3704  if ($usr = $db->fetchAssoc($r)) {
3705  return $usr["login"];
3706  }
3707 
3708  if (!$tryFallback) {
3709  return false;
3710  }
3711 
3712  // For compatibility, check for login (no ext_account entry given)
3713  $res = $db->queryF(
3714  "SELECT login FROM usr_data " .
3715  "WHERE login = %s AND auth_mode = %s AND (ext_account IS NULL OR ext_account = '') ",
3716  array("text", "text"),
3717  array($a_account, $a_auth)
3718  );
3719  if ($usr = $db->fetchAssoc($res)) {
3720  return $usr['login'];
3721  }
3722 
3723  // If auth_default == $a_auth => check for login
3724  if (ilAuthUtils::_getAuthModeName($settings->get('auth_mode')) == $a_auth) {
3725  $res = $db->queryF(
3726  "SELECT login FROM usr_data WHERE " .
3727  " ext_account = %s AND auth_mode = %s",
3728  array("text", "text"),
3729  array($a_account, "default")
3730  );
3731  if ($usr = $db->fetchAssoc($res)) {
3732  return $usr["login"];
3733  }
3734  // Search for login (no ext_account given)
3735  $res = $db->queryF(
3736  "SELECT login FROM usr_data " .
3737  "WHERE login = %s AND (ext_account IS NULL OR ext_account = '') AND auth_mode = %s",
3738  array("text", "text"),
3739  array($a_account, "default")
3740  );
3741  if ($usr = $db->fetchAssoc($res)) {
3742  return $usr["login"];
3743  }
3744  }
3745  return false;
3746  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static _getAuthModeName($a_auth_key)
$r
Definition: example_031.php:79
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _deleteAllPref()

static ilObjUser::_deleteAllPref (   $a_user_id)
static

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

Parameters
stringkeyword

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

References $ilDB, and array.

Referenced by delete(), and writePrefs().

1060  {
1061  global $ilDB;
1062 
1063  $ilDB->manipulateF(
1064  "DELETE FROM usr_pref WHERE usr_id = %s",
1065  array("integer"),
1066  array($a_user_id)
1067  );
1068  }
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _doesLoginnameExistInHistory()

static ilObjUser::_doesLoginnameExistInHistory (   $a_login)
static

Checks wether the passed loginname already exists in history.

public

Parameters
string$a_loginLoginname
Returns
boolean true or false

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

References $ilDB, $res, and array.

Referenced by ilAccountRegistrationGUI\saveForm().

888  {
889  global $ilDB;
890 
891  $res = $ilDB->queryF(
892  '
893  SELECT * FROM loginname_history
894  WHERE login = %s',
895  array('text'),
896  array($a_login)
897  );
898 
899  return $ilDB->fetchAssoc($res) ? true : false;
900  }
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
global $ilDB
+ 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 3034 of file class.ilObjUser.php.

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

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

3035  {
3036  global $ilDB;
3037 
3038  $ilDB->manipulateF(
3039  "DELETE FROM desktop_item WHERE " .
3040  " item_id = %s AND type = %s AND user_id = %s",
3041  array("integer", "text", "integer"),
3042  array($a_item_id, $a_type, $a_usr_id)
3043  );
3044 
3045  include_once './Services/Calendar/classes/class.ilCalendarCategories.php';
3047  }
static deletePDItemsCache($a_usr_id)
Delete cache (add remove desktop item)
$a_type
Definition: workflow.php:92
Create styles array
The data for the language used.
global $ilDB
+ 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.

public

Parameters
stringexternal account
stringauth mode

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

References $ilDB, $res, and array.

Referenced by ilObjUserTest\testAuthAndEmailMethods().

4368  {
4369  global $ilDB;
4370 
4371  $res = $ilDB->queryF(
4372  "SELECT * FROM usr_data " .
4373  "WHERE ext_account = %s AND auth_mode = %s",
4374  array("text", "text"),
4375  array($a_external_account, $a_auth_mode)
4376  );
4377  return $ilDB->fetchAssoc($res) ? true :false;
4378  }
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _generateRegistrationHash()

static ilObjUser::_generateRegistrationHash (   $a_usr_id)
static

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

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

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

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

Referenced by ilRegistrationMimeMailNotification\__construct().

4907  {
4908  global $ilDB;
4909 
4910  do {
4911  $continue = false;
4912 
4913  $random = new \ilRandom();
4914  $hashcode = substr(md5(uniqid($random->int(), true)), 0, 16);
4915 
4916  $res = $ilDB->queryf(
4917  '
4918  SELECT COUNT(usr_id) cnt FROM usr_data
4919  WHERE reg_hash = %s',
4920  array('text'),
4921  array($hashcode)
4922  );
4923  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
4924  if ($row->cnt > 0) {
4925  $continue = true;
4926  }
4927  break;
4928  }
4929 
4930  if ($continue) {
4931  continue;
4932  }
4933 
4934  $ilDB->manipulateF(
4935  '
4936  UPDATE usr_data
4937  SET reg_hash = %s
4938  WHERE usr_id = %s',
4939  array('text', 'integer'),
4940  array($hashcode, (int) $a_usr_id)
4941  );
4942 
4943  break;
4944  } while (true);
4945 
4946  return $hashcode;
4947  }
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _getAllUserAssignedStyles()

static ilObjUser::_getAllUserAssignedStyles ( )
static

skins and styles

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

References $ilDB, $styles, and array.

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

2917  {
2918  global $ilDB;
2919 
2920  $q = "SELECT DISTINCT up1.value style, up2.value skin FROM usr_pref up1, usr_pref up2 " .
2921  " WHERE up1.keyword = " . $ilDB->quote("style", "text") .
2922  " AND up2.keyword = " . $ilDB->quote("skin", "text") .
2923  " AND up1.usr_id = up2.usr_id";
2924 
2925  $sty_set = $ilDB->query($q);
2926 
2927  $styles = array();
2928  while ($sty_rec = $ilDB->fetchAssoc($sty_set)) {
2929  $styles[] = $sty_rec["skin"] . ":" . $sty_rec["style"];
2930  }
2931 
2932  return $styles;
2933  }
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _getAllUserData()

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

STATIC METHOD get all user data.

Parameters
arraydesired columns
Returns
array of user data public

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

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

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

2799  {
2800  global $ilDB;
2801 
2802  $result_arr = array();
2803  $types = array();
2804  $values = array();
2805 
2806  if ($a_fields !== null and is_array($a_fields)) {
2807  if (count($a_fields) == 0) {
2808  $select = "*";
2809  } else {
2810  if (($usr_id_field = array_search("usr_id", $a_fields)) !== false) {
2811  unset($a_fields[$usr_id_field]);
2812  }
2813 
2814  $select = implode(",", $a_fields) . ",usr_data.usr_id";
2815  // online time
2816  if (in_array('online_time', $a_fields)) {
2817  $select .= ",ut_online.online_time ";
2818  }
2819  }
2820 
2821  $q = "SELECT " . $select . " FROM usr_data ";
2822 
2823  // Add online_time if desired
2824  // Need left join here to show users that never logged in
2825  if (in_array('online_time', $a_fields)) {
2826  $q .= "LEFT JOIN ut_online ON usr_data.usr_id = ut_online.usr_id ";
2827  }
2828 
2829  switch ($active) {
2830  case 0:
2831  case 1:
2832  $q .= "WHERE active = " . $ilDB->quote($active, "integer");
2833  break;
2834  case 2:
2835  $q .= "WHERE time_limit_unlimited= " . $ilDB->quote(0, "integer");;
2836  break;
2837  case 3:
2838  $qtemp = $q . ", rbac_ua, object_data WHERE rbac_ua.rol_id = object_data.obj_id AND " .
2839  $ilDB->like("object_data.title", "text", "%crs%") . " AND usr_data.usr_id = rbac_ua.usr_id";
2840  $r = $ilDB->query($qtemp);
2841  $course_users = array();
2842  while ($row = $ilDB->fetchAssoc($r)) {
2843  array_push($course_users, $row["usr_id"]);
2844  }
2845  if (count($course_users)) {
2846  $q .= " WHERE " . $ilDB->in("usr_data.usr_id", $course_users, true, "integer") . " ";
2847  } else {
2848  return $result_arr;
2849  }
2850  break;
2851  case 4:
2852  $date = strftime("%Y-%m-%d %H:%I:%S", mktime(0, 0, 0, $_SESSION["user_filter_data"]["m"], $_SESSION["user_filter_data"]["d"], $_SESSION["user_filter_data"]["y"]));
2853  $q.= " AND last_login < " . $ilDB->quote($date, "timestamp");
2854  break;
2855  case 5:
2856  $ref_id = $_SESSION["user_filter_data"];
2857  if ($ref_id) {
2858  $q .= " LEFT JOIN obj_members ON usr_data.usr_id = obj_members.usr_id " .
2859  "WHERE obj_members.obj_id = (SELECT obj_id FROM object_reference " .
2860  "WHERE ref_id = " . $ilDB->quote($ref_id, "integer") . ") ";
2861  }
2862  break;
2863  case 6:
2864  global $rbacreview;
2865  $ref_id = $_SESSION["user_filter_data"];
2866  if ($ref_id) {
2867  $local_roles = $rbacreview->getRolesOfRoleFolder($ref_id, false);
2868  if (is_array($local_roles) && count($local_roles)) {
2869  $q.= " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE " .
2870  $ilDB->in("rbac_ua.rol_id", $local_roles, false, "integer") . " ";
2871  }
2872  }
2873  break;
2874  case 7:
2875  $rol_id = $_SESSION["user_filter_data"];
2876  if ($rol_id) {
2877  $q .= " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE rbac_ua.rol_id = " .
2878  $ilDB->quote($rol_id, "integer");
2879  }
2880  break;
2881  }
2882  $r = $ilDB->query($q);
2883 
2884  while ($row = $ilDB->fetchAssoc($r)) {
2885  $result_arr[] = $row;
2886  }
2887  }
2888 
2889  return $result_arr;
2890  }
$_SESSION["AccountId"]
$r
Definition: example_031.php:79
Create styles array
The data for the language used.
global $ilDB
+ 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.

Parameters
integeruser_id User ID of the current user.
Returns
array
Deprecated:
This is dead code since ILIAS 5.3.x (ilUsersOnlineBlock ...) and could be removed in future releases.

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

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

Referenced by ilUtil\getAssociatedUsersOnline().

4819  {
4820  global $ilias, $ilDB;
4821 
4822  $pd_set = new ilSetting("pd");
4823  $atime = $pd_set->get("user_activity_time") * 60;
4824  $ctime = time();
4825  $no_anonym = ($a_no_anonymous)
4826  ? "AND user_id <> " . $ilDB->quote(ANONYMOUS_USER_ID, "integer") . " "
4827  : "";
4828 
4829  // Get a list of object id's of all courses and groups for which
4830  // the current user has local roles.
4831  // Note: we have to use DISTINCT here, because a user may assume
4832  // multiple roles in a group or a course.
4833  $q = "SELECT DISTINCT dat.obj_id as obj_id " .
4834  "FROM rbac_ua ua " .
4835  "JOIN rbac_fa fa ON fa.rol_id = ua.rol_id " .
4836  "JOIN object_reference r1 ON r1.ref_id = fa.parent " .
4837  "JOIN tree ON tree.child = r1.ref_id " .
4838  "JOIN object_reference r2 ON r2.ref_id = tree.child " . // #17674 - rolf is gone
4839  "JOIN object_data dat ON dat.obj_id = r2.obj_id " .
4840  "WHERE ua.usr_id = " . $ilDB->quote($a_user_id, "integer") . " " .
4841  "AND fa.assign = " . $ilDB->quote("y", "text") . " " .
4842  "AND dat.type IN (" . $ilDB->quote("crs", "text") . "," .
4843  $ilDB->quote("grp", "text") . ")";
4844  $r = $ilDB->query($q);
4845 
4846  while ($row = $ilDB->fetchAssoc($r)) {
4847  $groups_and_courses_of_user[] = $row["obj_id"];
4848  }
4849 
4850  require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
4851  $tos_condition = '';
4853  $tos_condition = " AND (agree_date IS NOT NULL OR ud.usr_id = " . $ilDB->quote(SYSTEM_USER_ID, 'integer') . ") ";
4854  }
4855 
4856  // If the user is not in a course or a group, he has no associated users.
4857  if (count($groups_and_courses_of_user) == 0) {
4858  $q = "SELECT count(user_id) as num,ctime,user_id,firstname,lastname,title,login,last_login " .
4859  "FROM usr_session " .
4860  "JOIN usr_data ud ON user_id = ud.usr_id " .
4861  "WHERE user_id = " . $ilDB->quote($a_user_id, "integer") . " " .
4862  $no_anonym .
4863  $tos_condition .
4864  "AND expires > " . $ilDB->quote(time(), "integer") . " " .
4865  "GROUP BY user_id,ctime,firstname,lastname,title,login,last_login";
4866  $r = $ilDB->query($q);
4867  } else {
4868  $q = "SELECT count(user_id) as num,s.ctime,s.user_id,ud.firstname,ud.lastname,ud.title,ud.login,ud.last_login " .
4869  "FROM usr_session s " .
4870  "JOIN usr_data ud ON ud.usr_id = s.user_id " .
4871  "JOIN rbac_ua ua ON ua.usr_id = s.user_id " .
4872  "JOIN rbac_fa fa ON fa.rol_id = ua.rol_id " .
4873  "JOIN tree ON tree.child = fa.parent " .
4874  "JOIN object_reference or1 ON or1.ref_id = tree.child " . // #17674 - rolf is gone
4875  "JOIN object_data od ON od.obj_id = or1.obj_id " .
4876  "LEFT JOIN usr_pref p ON (p.usr_id = ud.usr_id AND p.keyword = " .
4877  $ilDB->quote("hide_own_online_status", "text") . ") " .
4878  "WHERE s.user_id != 0 " .
4879  $no_anonym .
4880  "AND (p.value IS NULL OR NOT p.value = " . $ilDB->quote("y", "text") . ") " .
4881  "AND s.expires > " . $ilDB->quote(time(), "integer") . " " .
4882  "AND fa.assign = " . $ilDB->quote("y", "text") . " " .
4883  $tos_condition .
4884  "AND " . $ilDB->in("od.obj_id", $groups_and_courses_of_user, false, "integer") . " " .
4885  "GROUP BY s.user_id,s.ctime,ud.firstname,ud.lastname,ud.title,ud.login,ud.last_login " .
4886  "ORDER BY ud.lastname, ud.firstname";
4887  $r = $ilDB->query($q);
4888  }
4889 
4890  while ($user = $ilDB->fetchAssoc($r)) {
4891  if ($atime <= 0
4892  || $user["ctime"] + $atime > $ctime) {
4893  $users[$user["user_id"]] = $user;
4894  }
4895  }
4896 
4897  return $users ? $users : array();
4898  }
$r
Definition: example_031.php:79
Create styles array
The data for the language used.
$users
Definition: authpage.php:44
global $ilDB
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ 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.

public

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

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

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

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

3609  {
3610  global $ilDB,$ilSetting;
3611 
3612  include_once('./Services/Authentication/classes/class.ilAuthUtils.php');
3613  $q = "SELECT login,usr_id,ext_account,auth_mode FROM usr_data " .
3614  "WHERE auth_mode = %s";
3615  $types[] = "text";
3616  $values[] = $a_auth_mode;
3617  if ($a_read_auth_default and ilAuthUtils::_getAuthModeName($ilSetting->get('auth_mode', AUTH_LOCAL)) == $a_auth_mode) {
3618  $q.= " OR auth_mode = %s ";
3619  $types[] = "text";
3620  $values[] = 'default';
3621  }
3622 
3623  $res = $ilDB->queryF($q, $types, $values);
3624  while ($row = $ilDB->fetchObject($res)) {
3625  if ($row->auth_mode == 'default') {
3626  $accounts[$row->usr_id] = $row->login;
3627  } else {
3628  $accounts[$row->usr_id] = $row->ext_account;
3629  }
3630  }
3631  return $accounts ? $accounts : array();
3632  }
static _getAuthModeName($a_auth_key)
foreach($_POST as $key=> $value) $res
const AUTH_LOCAL
Create styles array
The data for the language used.
global $ilSetting
Definition: privfeed.php:17
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getFeedPass()

static ilObjUser::_getFeedPass (   $a_user_id)
static

Lookup news feed password for user.

Parameters
integeruser_id
Returns
string feed_password md5-encoded, or false

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

References $ilDB, and _lookupPref().

4300  {
4301  global $ilDB;
4302 
4303  if ($a_user_id > 0) {
4304  return ilObjUser::_lookupPref($a_user_id, "priv_feed_pass");
4305  }
4306  return false;
4307  }
static _lookupPref($a_usr_id, $a_keyword)
global $ilDB
+ Here is the call graph for this function:

◆ _getImportedUserId()

static ilObjUser::_getImportedUserId (   $i2_id)
static

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

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

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

3516  {
3517  global $ilDB;
3518 
3519  $query = "SELECT obj_id FROM object_data WHERE import_id = " .
3520  $ilDB->quote($i2_id, "text");
3521 
3522  $res = $ilDB->query($query);
3523  while ($row = $ilDB->fetchObject($res)) {
3524  $id = $row->obj_id;
3525  }
3526  return $id ? $id : 0;
3527  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ Here is the caller graph for this function:

◆ _getLastHistoryDataByUserId()

static ilObjUser::_getLastHistoryDataByUserId (   $a_usr_id)
static

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

Throws an ilUserException in case no entry could be found.

public

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

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

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

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

915  {
916  global $ilDB;
917 
918  $ilDB->setLimit(1, 0);
919  $res = $ilDB->queryF(
920  '
921  SELECT login, history_date FROM loginname_history
922  WHERE usr_id = %s ORDER BY history_date DESC',
923  array('integer'),
924  array($a_usr_id)
925  );
926  $row = $ilDB->fetchAssoc($res);
927  if (!is_array($row) || !count($row)) {
928  throw new ilUserException('');
929  }
930 
931  return array(
932  $row['login'], $row['history_date']
933  );
934  }
Class for user related exception handling in ILIAS.
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _getLocalAccountsForEmail()

static ilObjUser::_getLocalAccountsForEmail (   $a_email)
static

check whether external account and authentication method matches with a user

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

References $ilDB, $ilSetting, $users, and array.

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

3771  {
3772  global $ilDB, $ilSetting;
3773 
3774  // default set to local (1)?
3775 
3776  $q = "SELECT * FROM usr_data WHERE " .
3777  " email = %s AND (auth_mode = %s ";
3778  $types = array("text", "text");
3779  $values = array($a_email, "local");
3780 
3781  if ($ilSetting->get("auth_mode") == 1) {
3782  $q.=" OR auth_mode = %s";
3783  $types[] = "text";
3784  $values[] = "default";
3785  }
3786 
3787  $q.= ")";
3788 
3789  $users = array();
3790  $usr_set = $ilDB->queryF($q, $types, $values);
3791  while ($usr_rec = $ilDB->fetchAssoc($usr_set)) {
3792  $users[$usr_rec["usr_id"]] = $usr_rec["login"];
3793  }
3794 
3795  return $users;
3796  }
Create styles array
The data for the language used.
$users
Definition: authpage.php:44
global $ilSetting
Definition: privfeed.php:17
global $ilDB
+ Here is the caller graph for this function:

◆ _getLoginAttempts()

static ilObjUser::_getLoginAttempts (   $a_usr_id)
static

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

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

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

4629  {
4630  global $ilDB;
4631 
4632  $query = "SELECT login_attempts FROM usr_data WHERE usr_id = %s";
4633  $result = $ilDB->queryF($query, array('integer'), array($a_usr_id));
4634  $record = $ilDB->fetchAssoc($result);
4635  $login_attempts = $record['login_attempts'];
4636 
4637  return $login_attempts;
4638  }
$result
$query
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _getNumberOfUsersForStyle()

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

skins and styles

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

References $ilDB.

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

2896  {
2897  global $ilDB;
2898 
2899  $q = "SELECT count(*) as cnt FROM usr_pref up1, usr_pref up2 " .
2900  " WHERE up1.keyword= " . $ilDB->quote("style", "text") .
2901  " AND up1.value= " . $ilDB->quote($a_style, "text") .
2902  " AND up2.keyword= " . $ilDB->quote("skin", "text") .
2903  " AND up2.value= " . $ilDB->quote($a_skin, "text") .
2904  " AND up1.usr_id = up2.usr_id ";
2905 
2906  $cnt_set = $ilDB->query($q);
2907 
2908  $cnt_rec = $ilDB->fetchAssoc($cnt_set);
2909 
2910  return $cnt_rec["cnt"];
2911  }
global $ilDB
+ Here is the caller graph for this function:

◆ _getNumberOfUsersPerAuthMode()

static ilObjUser::_getNumberOfUsersPerAuthMode ( )
static

get number of users per auth mode

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

References $ilDB, $r, and array.

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

3752  {
3753  global $ilDB;
3754 
3755  $r = $ilDB->query("SELECT count(*) AS cnt, auth_mode FROM usr_data " .
3756  "GROUP BY auth_mode");
3757  $cnt_arr = array();
3758  while ($cnt = $ilDB->fetchAssoc($r)) {
3759  $cnt_arr[$cnt["auth_mode"]] = $cnt["cnt"];
3760  }
3761 
3762  return $cnt_arr;
3763  }
$r
Definition: example_031.php:79
Create styles array
The data for the language used.
global $ilDB
+ 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 4568 of file class.ilObjUser.php.

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

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

4569  {
4570  global $ilDB;
4571 
4572  $prefs = array();
4573 
4574  $r = $ilDB->queryF(
4575  "SELECT * FROM usr_pref WHERE usr_id = %s",
4576  array("integer"),
4577  array($user_id)
4578  );
4579 
4580  while ($row = $ilDB->fetchAssoc($r)) {
4581  $prefs[$row["keyword"]] = $row["value"];
4582  }
4583 
4584  return $prefs;
4585  }
$r
Definition: example_031.php:79
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _getUserData()

static ilObjUser::_getUserData (   $a_internalids)
static

return user data for given user ids

Parameters
arrayof internal ids or numerics $a_internalids

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

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

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

4524  {
4525  global $ilDB;
4526 
4527  $ids = array();
4528  if (is_array($a_internalids)) {
4529  foreach ($a_internalids as $internalid) {
4530  if (is_numeric($internalid)) {
4531  $ids[] = $internalid;
4532  } else {
4533  $parsedid = ilUtil::__extractId($internalid, IL_INST_ID);
4534  if (is_numeric($parsedid) && $parsedid > 0) {
4535  $ids[] = $parsedid;
4536  }
4537  }
4538  }
4539  }
4540  if (count($ids) == 0) {
4541  $ids [] = -1;
4542  }
4543 
4544  $query = "SELECT usr_data.*, usr_pref.value AS language
4545  FROM usr_data
4546  LEFT JOIN usr_pref
4547  ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
4548  WHERE " . $ilDB->in("usr_data.usr_id", $ids, false, "integer");
4549  $values[] = "language";
4550  $types[] = "text";
4551 
4552  $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4553 
4554  $data = array();
4555  $result = $ilDB->queryF($query, $types, $values);
4556  while ($row = $ilDB->fetchAssoc($result)) {
4557  $data[] = $row;
4558  }
4559  return $data;
4560  }
$result
$query
Create styles array
The data for the language used.
global $ilDB
static __extractId($ilias_id, $inst_id)
extract ref id from role title, e.g.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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

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

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

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

2578  {
2579  global $ilias, $ilDB;
2580 
2581  $res = $ilDB->queryF(
2582  "SELECT login FROM usr_data " .
2583  "WHERE email = %s and active = 1",
2584  array("text"),
2585  array($a_email)
2586  );
2587  $ids = array();
2588  while ($row = $ilDB->fetchObject($res)) {
2589  $ids[] = $row->login;
2590  }
2591 
2592  return $ids;
2593  }
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _getUserIdsByInactivationPeriod()

static ilObjUser::_getUserIdsByInactivationPeriod (   $period)
static

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

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

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

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

Referenced by ilCronDeleteInactivatedUserAccounts\run().

5048  {
5050  $field = 'inactivation_date';
5052 
5053  if (!(int) $period) {
5054  throw new ilException('no valid period given');
5055  }
5056 
5057  global $ilDB;
5058 
5059  $date = date('Y-m-d H:i:s', (time() - ((int) $period * 24 * 60 * 60)));
5060 
5061  $query = "SELECT usr_id FROM usr_data WHERE $field < %s AND active = %s";
5062 
5063  $res = $ilDB->queryF($query, array('timestamp', 'integer'), array($date, 0));
5064 
5065  $ids = array();
5066  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
5067  $ids[] = $row->usr_id;
5068  }
5069 
5070  return $ids;
5071  }
foreach($_POST as $key=> $value) $res
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
$query
Create styles array
The data for the language used.
global $ilDB
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ 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 public

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

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

Referenced by ilCronDeleteInactiveUserAccounts\hasCustomSettings().

5018  {
5019  if (!(int) $period) {
5020  throw new ilException('no valid period given');
5021  }
5022 
5023  global $ilDB;
5024 
5025  $date = date('Y-m-d H:i:s', (time() - ((int) $period * 24 * 60 * 60)));
5026 
5027  $query = "SELECT usr_id FROM usr_data WHERE last_login < %s OR (ISNULL(last_login) AND create_date < %s)";
5028 
5029  $res = $ilDB->queryF($query, array('timestamp', 'timestamp'), array($date, $date));
5030 
5031  $ids = array();
5032  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
5033  $ids[] = $row->usr_id;
5034  }
5035 
5036  return $ids;
5037  }
foreach($_POST as $key=> $value) $res
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
$query
Create styles array
The data for the language used.
global $ilDB
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the caller graph for this function:

◆ _getUsersForClipboadObject()

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

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

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

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

References $a_type, $ilDB, $users, and array.

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

3482  {
3483  global $ilDB;
3484 
3485  $q = "SELECT DISTINCT user_id FROM personal_clipboard WHERE " .
3486  "item_id = " . $ilDB->quote($a_id, "integer") . " AND " .
3487  "type = " . $ilDB->quote($a_type, "text");
3488  $user_set = $ilDB->query($q);
3489  $users = array();
3490  while ($user_rec = $ilDB->fetchAssoc($user_set)) {
3491  $users[] = $user_rec["user_id"];
3492  }
3493 
3494  return $users;
3495  }
$a_type
Definition: workflow.php:92
Create styles array
The data for the language used.
$users
Definition: authpage.php:44
global $ilDB
+ Here is the caller graph for this function:

◆ _getUsersForFolder()

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

get users for a category or from system folder

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

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

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

Referenced by ilSoapUserAdministration\getUsersForContainer().

4429  {
4430  global $ilDB;
4431  $data = array();
4432  $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 ";
4433  $types[] = "text";
4434  $values[] = "language";
4435 
4436  if (is_numeric($active) && $active > -1) {
4437  $query .= " AND usr_data.active = %s";
4438  $values[] = $active;
4439  $types[] = "integer";
4440  }
4441 
4442  if ($ref_id != USER_FOLDER_ID) {
4443  $query.= " AND usr_data.time_limit_owner = %s";
4444  $values[] = $ref_id;
4445  $types[] = "integer";
4446  }
4447 
4448  $query .= " AND usr_data.usr_id != %s ";
4449  $values[] = ANONYMOUS_USER_ID;
4450  $types[] = "integer";
4451 
4452  $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4453 
4454  $result = $ilDB->queryF($query, $types, $values);
4455  $data = array();
4456  while ($row = $ilDB->fetchAssoc($result)) {
4457  array_push($data, $row);
4458  }
4459 
4460  return $data;
4461  }
$result
$query
Create styles array
The data for the language used.
global $ilDB
const USER_FOLDER_ID
Class ilObjUserFolder.
+ Here is the caller graph for this function:

◆ _getUsersForGroup()

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

return user data for group members

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

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

References $active, and _getUsersForIds().

Referenced by ilSoapUserAdministration\getUsersForContainer().

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

◆ _getUsersForIds()

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

return user data for given user id

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

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

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

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

4481  {
4482  global $rbacadmin, $rbacreview, $ilDB;
4483 
4484  $query = "SELECT usr_data.*, usr_pref.value AS language
4485  FROM usr_data
4486  LEFT JOIN usr_pref ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
4487  WHERE " . $ilDB->in("usr_data.usr_id", $a_mem_ids, false, "integer") . "
4488  AND usr_data.usr_id != %s";
4489  $values[] = "language";
4490  $types[] = "text";
4491  $values[] = ANONYMOUS_USER_ID;
4492  $types[] = "integer";
4493 
4494  if (is_numeric($active) && $active > -1) {
4495  $query .= " AND active = %s";
4496  $values[] = $active;
4497  $types[] = "integer";
4498  }
4499 
4500  if ($timelimitowner != USER_FOLDER_ID && $timelimitowner != -1) {
4501  $query.= " AND usr_data.time_limit_owner = %s";
4502  $values[] = $timelimitowner;
4503  $types[] = "integer";
4504  }
4505 
4506  $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4507 
4508  $result = $ilDB->queryF($query, $types, $values);
4509  while ($row = $ilDB->fetchAssoc($result)) {
4510  $mem_arr[] = $row;
4511  }
4512 
4513  return $mem_arr ? $mem_arr : array();
4514  }
$result
$query
Create styles array
The data for the language used.
global $ilDB
const USER_FOLDER_ID
Class ilObjUserFolder.
+ Here is the caller graph for this function:

◆ _getUsersForRole()

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

return array of complete users which belong to a specific role

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

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

References $active, $data, $ilDB, $query, $r, ilObject\$rbacreview, $row, and array.

Referenced by ilSoapUserAdministration\getUserForRole().

4388  {
4389  global $ilDB, $rbacreview;
4390  $data = array();
4391 
4392  $ids = $rbacreview->assignedUsers($role_id);
4393 
4394  if (count($ids) == 0) {
4395  $ids = array(-1);
4396  }
4397 
4398  $query = "SELECT usr_data.*, usr_pref.value AS language
4399  FROM usr_data
4400  LEFT JOIN usr_pref ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
4401  WHERE " . $ilDB->in("usr_data.usr_id", $ids, false, "integer");
4402  $values[] = "language";
4403  $types[] = "text";
4404 
4405 
4406  if (is_numeric($active) && $active > -1) {
4407  $query .= " AND usr_data.active = %s";
4408  $values[] = $active;
4409  $types[] = "integer";
4410  }
4411 
4412  $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4413 
4414  $r = $ilDB->queryF($query, $types, $values);
4415  $data = array();
4416  while ($row = $ilDB->fetchAssoc($r)) {
4417  $data[] = $row;
4418  }
4419  return $data;
4420  }
$r
Definition: example_031.php:79
$query
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _incrementLoginAttempts()

static ilObjUser::_incrementLoginAttempts (   $a_usr_id)
static

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

References $ilDB, $query, and array.

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

4641  {
4642  global $ilDB;
4643 
4644  $query = "UPDATE usr_data SET login_attempts = (login_attempts + 1) WHERE usr_id = %s";
4645  $affected = $ilDB->manipulateF($query, array('integer'), array($a_usr_id));
4646 
4647  if ($affected) {
4648  return true;
4649  } else {
4650  return false;
4651  }
4652  }
$query
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _isAnonymous()

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

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

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

5436  {
5437  return $usr_id == ANONYMOUS_USER_ID;
5438  }
+ 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 3103 of file class.ilObjUser.php.

References $a_type, $ilDB, and array.

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

3104  {
3105  global $ilDB;
3106 
3107  if (self::$is_desktop_item_loaded[$a_usr_id . ":" . $a_item_id]) {
3108  return self::$is_desktop_item_cache[$a_usr_id . ":" . $a_item_id . ":" . $a_type];
3109  }
3110  $item_set = $ilDB->queryF(
3111  "SELECT item_id FROM desktop_item WHERE " .
3112  "item_id = %s AND type = %s AND user_id = %s",
3113  array("integer", "text", "integer"),
3114  array($a_item_id, $a_type, $a_usr_id)
3115  );
3116 
3117  if ($ilDB->fetchAssoc($item_set)) {
3118  return true;
3119  } else {
3120  return false;
3121  }
3122  }
$a_type
Definition: workflow.php:92
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _loginExists()

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

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

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

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

References $ilDB, $r, and $row.

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

4335  {
4336  global $ilDB;
4337 
4338  $q = "SELECT DISTINCT login, usr_id FROM usr_data " .
4339  "WHERE login = %s";
4340  $types[] = "text";
4341  $values[] = $a_login;
4342 
4343  if ($a_user_id != 0) {
4344  $q.= " AND usr_id != %s ";
4345  $types[] = "integer";
4346  $values[] = $a_user_id;
4347  }
4348 
4349  $r = $ilDB->queryF($q, $types, $values);
4350 
4351  if ($row = $ilDB->fetchAssoc($r)) {
4352  return $row['usr_id'];
4353  }
4354  return false;
4355  }
$r
Definition: example_031.php:79
global $ilDB
+ Here is the caller graph for this function:

◆ _lookup()

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

Private function for lookup methods.

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

References $ilDB, $res, and array.

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

647  {
648  global $ilDB;
649 
650  $res = $ilDB->queryF(
651  "SELECT " . $a_field . " FROM usr_data WHERE usr_id = %s",
652  array("integer"),
653  array($a_user_id)
654  );
655 
656  while ($set = $ilDB->fetchAssoc($res)) {
657  return $set[$a_field];
658  }
659  return false;
660  }
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupActive()

static ilObjUser::_lookupActive (   $a_usr_id)
static

Check user account active.

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

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

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

2152  {
2153  global $ilDB;
2154 
2155  $query = 'SELECT usr_id FROM usr_data ' .
2156  'WHERE active = ' . $ilDB->quote(1, 'integer') . ' ' .
2157  'AND usr_id = ' . $ilDB->quote($a_usr_id, 'integer');
2158  $res = $ilDB->query($query);
2159  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
2160  return true;
2161  }
2162  return false;
2163  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupAuthMode()

static ilObjUser::_lookupAuthMode (   $a_usr_id)
static

lookup auth mode

public

Parameters
intusr_id

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

References _lookup().

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

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

◆ _lookupClientIP()

static ilObjUser::_lookupClientIP (   $a_user_id)
static

Lookup client ip.

Parameters
intuser id
Returns
string client ip

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

References _lookup().

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

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

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

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

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

3181  {
3182  global $ilUser, $rbacsystem, $tree, $ilDB;
3183 
3184  if ($a_types == "") {
3185  $is_nested_set = ($tree->getTreeImplementation() instanceof ilNestedSetTree);
3186 
3187  $item_set = $ilDB->queryF("SELECT obj.obj_id, obj.description, oref.ref_id, obj.title, obj.type " .
3188  " FROM desktop_item it, object_reference oref " .
3189  ", object_data obj" .
3190  " WHERE " .
3191  "it.item_id = oref.ref_id AND " .
3192  "oref.obj_id = obj.obj_id AND " .
3193  "it.user_id = %s", array("integer"), array($user_id));
3194  $items = $all_parent_path = array();
3195  while ($item_rec = $ilDB->fetchAssoc($item_set)) {
3196  if ($tree->isInTree($item_rec["ref_id"])
3197  && $item_rec["type"] != "rolf"
3198  && $item_rec["type"] != "itgr") { // due to bug 11508
3199  $parent_ref = $tree->getParentId($item_rec["ref_id"]);
3200 
3201  if (!isset($all_parent_path[$parent_ref])) {
3202  // #15746
3203  //if($is_nested_set)
3204  //{
3205  // $par_left = $tree->getLeftValue($parent_ref);
3206  // $all_parent_path[$parent_ref] = sprintf("%010d", $par_left);
3207  //}
3208  //else
3209  //{
3210  if ($parent_ref > 0) { // workaround for #0023176
3211  $node = $tree->getNodeData($parent_ref);
3212  $all_parent_path[$parent_ref] = $node["title"];
3213  } else {
3214  $all_parent_path[$parent_ref] = "";
3215  }
3216  //}
3217  }
3218 
3219  $parent_path = $all_parent_path[$parent_ref];
3220 
3221  $title = ilObject::_lookupTitle($item_rec["obj_id"]);
3222  $desc = ilObject::_lookupDescription($item_rec["obj_id"]);
3223  $items[$parent_path . $title . $item_rec["ref_id"]] =
3224  array("ref_id" => $item_rec["ref_id"],
3225  "obj_id" => $item_rec["obj_id"],
3226  "type" => $item_rec["type"],
3227  "title" => $title,
3228  "description" => $desc,
3229  "parent_ref" => $parent_ref);
3230  }
3231  }
3232  ksort($items);
3233  } else {
3234  // due to bug 11508
3235  if (!is_array($a_types)) {
3236  $a_types = array($a_types);
3237  }
3238  $items = array();
3239  $foundsurveys = array();
3240  foreach ($a_types as $a_type) {
3241  if ($a_type == "itgr") {
3242  continue;
3243  }
3244  $item_set = $ilDB->queryF(
3245  "SELECT obj.obj_id, obj.description, oref.ref_id, obj.title FROM desktop_item it, object_reference oref " .
3246  ", object_data obj WHERE " .
3247  "it.item_id = oref.ref_id AND " .
3248  "oref.obj_id = obj.obj_id AND " .
3249  "it.type = %s AND " .
3250  "it.user_id = %s " .
3251  "ORDER BY title",
3252  array("text", "integer"),
3253  array($a_type, $user_id)
3254  );
3255 
3256  while ($item_rec = $ilDB->fetchAssoc($item_set)) {
3257  $title = ilObject::_lookupTitle($item_rec["obj_id"]);
3258  $desc = ilObject::_lookupDescription($item_rec["obj_id"]);
3259  $items[$title . $a_type . $item_rec["ref_id"]] =
3260  array("ref_id" => $item_rec["ref_id"],
3261  "obj_id" => $item_rec["obj_id"], "type" => $a_type,
3262  "title" => $title, "description" => $desc);
3263  }
3264  }
3265  ksort($items);
3266  }
3267 
3268  return $items;
3269  }
static _lookupTitle($a_id)
lookup object title
Base class for nested set path based trees.
$a_type
Definition: workflow.php:92
static _lookupDescription($a_id)
lookup object description
$ilUser
Definition: imgupload.php:18
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _lookupEmail()

static ilObjUser::_lookupEmail (   $a_user_id)
static

Lookup email.

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

References _lookup().

Referenced by ilObjSurvey\getAppraiseesData(), ilSystemSupportContactsGUI\getFooterLink(), ilSystemSupportContacts\getMailToAddress(), ilObjSurvey\getRatersData(), ilBadgeHandler\sendNotification(), ilMailSearchGUI\showResults(), and ilObjUserTest\testCreateSetLookupDelete().

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

◆ _lookupExternalAccount()

static ilObjUser::_lookupExternalAccount (   $a_user_id)
static

lookup external account for login and authmethod

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

References _lookup().

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

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

◆ _lookupFeedHash()

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

Lookup news feed hash for user.

If hash does not exist, create one.

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

References $ilDB, and array.

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

4265  {
4266  global $ilDB;
4267 
4268  if ($a_user_id > 0) {
4269  $set = $ilDB->queryF(
4270  "SELECT feed_hash from usr_data WHERE usr_id = %s",
4271  array("integer"),
4272  array($a_user_id)
4273  );
4274  if ($rec = $ilDB->fetchAssoc($set)) {
4275  if (strlen($rec["feed_hash"]) == 32) {
4276  return $rec["feed_hash"];
4277  } elseif ($a_create) {
4278  $random = new \ilRandom();
4279  $hash = md5($random->int(1, 9999999) + str_replace(" ", "", (string) microtime()));
4280  $ilDB->manipulateF(
4281  "UPDATE usr_data SET feed_hash = %s" .
4282  " WHERE usr_id = %s",
4283  array("text", "integer"),
4284  array($hash, $a_user_id)
4285  );
4286  return $hash;
4287  }
4288  }
4289  }
4290 
4291  return false;
4292  }
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupFields()

static ilObjUser::_lookupFields (   $a_user_id)
static

lookup fields (deprecated; use more specific methods instead)

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

References $ilDB, $res, and array.

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

753  {
754  global $ilDB;
755 
756  $res = $ilDB->queryF(
757  "SELECT * FROM usr_data WHERE usr_id = %s",
758  array("integer"),
759  array($a_user_id)
760  );
761  $user_rec = $ilDB->fetchAssoc($res);
762  return $user_rec;
763  }
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupFullname()

static ilObjUser::_lookupFullname (   $a_user_id)
static

Lookup Full Name.

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

References $fullname, $ilDB, and array.

Referenced by ilExAssignmentTeam\addTeamMember(), ilCalendarAppointmentGUI\book(), ilObjStudyProgrammeIndividualPlanGUI\buildFrame(), ilCalendarAppointmentGUI\cancelBooking(), ilAppointmentPresentationConsultationHoursGUI\collectPropertiesAndActions(), ilObjDataCollection\doUpdate(), ilRbacLogTableGUI\fillRow(), ilLPTableBaseGUI\getExportMeta(), ilCalendarAppointmentPanelGUI\getHTML(), ilCalendarBlockGUI\getHTML(), ilExAssignmentTeamLogTableGUI\getItems(), ilConsultationHourAppointments\getManager(), ilExAssignmentTeam\getTeamId(), ilExParticipantTableGUI\initMode(), ilSCORMTrackingItemsPerUserTableGUI\initTable(), ilSCORMTrackingItemPerUserTableGUI\initTable(), ilBookingEntry\lookupManagedBookingsForObject(), ilSCORMTrackingItemsScoTableGUI\parse(), ilConsultationHoursTableGUI\parse(), ilCalendarPresentationGUI\prepareOutput(), ilCalendarCategories\readConsultationHoursCalendar(), ilExAssignmentTeam\removeTeamMember(), ilIndividualAssessmentMembersGUI\removeUserConfirmation(), ilCalendarMailNotification\send(), ilConsultationHoursGUI\sendInfoAboutUnassignedUsers(), ilWikiUtil\sendNotification(), ilNote\sendNotifications(), ilObjSurvey\sendTutorNotification(), and ilObjSurvey\sentReminder().

666  {
667  global $ilDB;
668 
669  $set = $ilDB->queryF(
670  "SELECT title, firstname, lastname FROM usr_data WHERE usr_id = %s",
671  array("integer"),
672  array($a_user_id)
673  );
674 
675  if ($rec = $ilDB->fetchAssoc($set)) {
676  if ($rec["title"]) {
677  $fullname = $rec["title"] . " ";
678  }
679  if ($rec["firstname"]) {
680  $fullname .= $rec["firstname"] . " ";
681  }
682  if ($rec["lastname"]) {
683  $fullname .= $rec["lastname"];
684  }
685  }
686  return $fullname;
687  }
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupGender()

static ilObjUser::_lookupGender (   $a_user_id)
static

Lookup gender.

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

References _lookup().

Referenced by ilMail\getSalutation(), and ilObjUserTest\testCreateSetLookupDelete().

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

◆ _lookupId()

static ilObjUser::_lookupId (   $a_user_str)
static

Lookup id by login.

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

References $ilDB, $res, and array.

Referenced by ilDiskQuotaSummaryNotification\__construct(), ilObjUserGUI\_goto(), ilOrgUnitStaffGUI\addOtherRoles(), ilOrgUnitUserAssignmentGUI\addStaff(), ilOrgUnitStaffGUI\addStaff(), ilRepositorySearchGUI\addUserFromAutoComplete(), ilObjBlogGUI\addUserFromAutoComplete(), ilExerciseManagementGUI\addUserFromAutoCompleteObject(), ilExSubmissionTeamGUI\addUserFromAutoCompleteObject(), ilSkillProfileGUI\assignUser(), ilOrgUnitSimpleUserImport\buildUserId(), ilChatroomInviteUsersToPrivateRoomGUI\byLogin(), ilPermission2GUI\changeOwner(), checkUserId(), ilAuthProviderShibboleth\doAuthentication(), ilAuthProviderCAS\doAuthentication(), ilAuthProviderRadius\doAuthentication(), ilAuthProviderApache\doAuthentication(), ilLTIAppEventListener\doCronUpdate(), ilServicesAuthenticationExtractor\extractAfterLogin(), ilAuthBase\failedLoginObserver(), ilAuthProviderLTI\findUserId(), ilMail\formatNamesForOutput(), ilMail\getCountRecipient(), ilMail\getEmailRecipients(), ilObjectPermissionStatusGUI\getUser(), getUserIdByLogin(), ilSystemSupportContacts\getValidSupportContactIds(), ilDclStandardField\getValueFromExcel(), ilSoapObjectAdministration\getXMLTree(), ilAuthFrontend\handleAuthenticationFail(), ilAuthProviderCAS\handleLDAPDataSource(), ilAuthProviderApache\handleLDAPDataSource(), ilAuthProviderECS\handleLogin(), ilSessionControl\handleLoginEvent(), ilAuthProviderSaml\handleSamlAuth(), ilAuthProviderSaml\importUser(), ilPCParagraph\intLinks2xml(), ilChatroom\inviteUserToPrivateRoomByLogin(), ilAuthContainerECS\loginObserver(), 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().

785  {
786  global $ilDB;
787 
788  if (!is_array($a_user_str)) {
789  $res = $ilDB->queryF(
790  "SELECT usr_id FROM usr_data WHERE login = %s",
791  array("text"),
792  array($a_user_str)
793  );
794  $user_rec = $ilDB->fetchAssoc($res);
795  return $user_rec["usr_id"];
796  } else {
797  $set = $ilDB->query(
798  "SELECT usr_id FROM usr_data " .
799  " WHERE " . $ilDB->in("login", $a_user_str, false, "text")
800  );
801  $ids = array();
802  while ($rec = $ilDB->fetchAssoc($set)) {
803  $ids[] = $rec["usr_id"];
804  }
805  return $ids;
806  }
807  }
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
global $ilDB
+ 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.

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

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

1960  {
1961  global $DIC;
1962 
1963  $ilDB = $DIC->database();
1964  $lng = $DIC->language();
1965 
1966  $q = "SELECT value FROM usr_pref WHERE usr_id= " .
1967  $ilDB->quote($a_usr_id, "integer") . " AND keyword = " .
1968  $ilDB->quote('language', "text");
1969  $r = $ilDB->query($q);
1970 
1971  while ($row = $ilDB->fetchAssoc($r)) {
1972  return $row['value'];
1973  }
1974  if (is_object($lng)) {
1975  return $lng->getDefaultLanguage();
1976  }
1977  return 'en';
1978  }
global $DIC
Definition: saml.php:7
$r
Definition: example_031.php:79
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupLastLogin()

static ilObjUser::_lookupLastLogin (   $a_user_id)
static

lookup last login

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

References _lookup().

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

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

◆ _lookupLogin()

static ilObjUser::_lookupLogin (   $a_user_id)
static

lookup login

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

References _lookup().

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

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

◆ _lookupName()

static ilObjUser::_lookupName (   $a_user_id)
static

lookup user name

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

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

References $ilDB, $res, and array.

Referenced by ilExGradesTableGUI\__construct(), ilFileVersionTableGUI\__construct(), ilGroupXMLParser\__parseId(), ilObjTestAccess\_getParticipantData(), ilSoapLearningProgressAdministration\addUserProgress(), ilMailUserActionProvider\collectActionsForTargetUser(), ilMailMemberSearchDataProvider\collectTableData(), ilMembershipGUI\confirmAssignFromWaitingList(), ilMembershipGUI\confirmAssignSubscribers(), ilSessionMembershipGUI\confirmDeleteParticipants(), ilMembershipGUI\confirmDeleteParticipants(), ilMembershipGUI\confirmRefuseFromList(), ilMembershipGUI\confirmRefuseSubscribers(), 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(), ilDclBaseRecordModel\fillRecordFieldExcelExport(), ilAssessmentFolderLogTableGUI\fillRow(), ilPageHistoryTableGUI\fillRow(), ilCalendarInboxSharedTableGUI\fillRow(), ilRbacLogTableGUI\fillRow(), ilObjSurvey\getAppraiseesData(), ilSkillProfile\getAssignedUsers(), ilLMTracker\getBlockedUsersInformation(), ilAttendanceList\getHTML(), ilSurveyParticipantsTableGUI\getItems(), ilSessionOverviewTableGUI\getItems(), ilCourseParticipantsGroupsTableGUI\getItems(), ilBookingReservation\getListByDate(), ilContSkillMemberTableGUI\getMembers(), ilExAssignment\getMultiFeedbackFiles(), ilPageObject\getPageContributors(), ilPageObject\getParentObjectContributors(), ilMilestoneResponsiblesTableGUI\getParticipantsAndResponsibles(), ilObjSurvey\getRatersData(), ilMail\getSalutation(), ilDclBaseRecordModel\getStandardField(), ilForumSettingsGUI\getUserNotificationTableData(), ilExerciseXMLWriter\handleAssignmentMembers(), ilWorkspaceShareTableGUI\importData(), ilLOMemberTestResultTableGUI\init(), ilContSkillAdminGUI\initCompetenceAssignmentForm(), ilWorkspaceShareTableGUI\initFilter(), ilExerciseManagementGUI\initIndividualDeadlineForm(), ilObjectCustomUserFieldsGUI\initMemberForm(), ilExParticipantTableGUI\initMode(), ilObjSurveyGUI\initPropertiesForm(), ilAuthContainerCalendarToken\loginObserver(), ilTestEvaluationGUI\outParticipantsResultsOverview(), ilUserClipboardTableGUI\parse(), ilCalendarSharedUserListTableGUI\parse(), ilCalendarSharedListTableGUI\parse(), ilConsultationHoursTableGUI\parse(), ilGroupParticipantsTableGUI\parse(), ilCourseParticipantsTableGUI\parse(), ilObjPortfolioGUI\printView(), ilObjGroupGUI\readMemberData(), ilObjCourseGUI\readMemberData(), ilCalendarEntry\readResponsibleUsers(), ilSubscriberTableGUI\readSubscriberData(), ilWaitingListTableGUI\readUserData(), ilObjPortfolioBaseGUI\renderFullscreenHeader(), ilObjBlogGUI\renderFullscreenHeader(), ilTestScoringGUI\saveManScoringParticipantScreen(), ilExerciseManagementGUI\saveStatus(), ilExAssignment\sendMultiFeedbackStructureFile(), ilMailSearchCoursesGUI\showMembers(), ilExerciseManagementGUI\showParticipantObject(), ilMailSearchGUI\showResults(), ilCourseContentGUI\showUserTimings(), ilObjUserTest\testCreateSetLookupDelete(), ilObjTest\userLookupFullName(), ilMailNotification\userToString(), and ilObjStudyProgrammeMembersGUI\viewCompletedCourses().

733  {
734  global $ilDB;
735 
736  $res = $ilDB->queryF(
737  "SELECT firstname, lastname, title, login FROM usr_data WHERE usr_id = %s",
738  array("integer"),
739  array($a_user_id)
740  );
741  $user_rec = $ilDB->fetchAssoc($res);
742  return array("user_id" => $a_user_id,
743  "firstname" => $user_rec["firstname"],
744  "lastname" => $user_rec["lastname"],
745  "title" => $user_rec["title"],
746  "login" => $user_rec["login"]);
747  }
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupPref()

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

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

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

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

1195  {
1196  global $ilDB;
1197 
1198  $query = "SELECT * FROM usr_pref WHERE usr_id = " . $ilDB->quote($a_usr_id, "integer") . " " .
1199  "AND keyword = " . $ilDB->quote($a_keyword, "text");
1200  $res = $ilDB->query($query);
1201 
1202  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1203  return $row->value;
1204  }
1205  return false;
1206  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupSecondEmail()

static ilObjUser::_lookupSecondEmail (   $a_user_id)
static

Lookup second e-mail.

Parameters
$a_user_id
Returns
null|string

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

References _lookup().

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

◆ _moveUsersToStyle()

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

skins and styles

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

References $ilDB.

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

2939  {
2940  global $ilDB;
2941 
2942  $q = "SELECT up1.usr_id usr_id FROM usr_pref up1, usr_pref up2 " .
2943  " WHERE up1.keyword= " . $ilDB->quote("style", "text") .
2944  " AND up1.value= " . $ilDB->quote($a_from_style, "text") .
2945  " AND up2.keyword= " . $ilDB->quote("skin", "text") .
2946  " AND up2.value= " . $ilDB->quote($a_from_skin, "text") .
2947  " AND up1.usr_id = up2.usr_id ";
2948 
2949  $usr_set = $ilDB->query($q);
2950 
2951  while ($usr_rec = $ilDB->fetchAssoc($usr_set)) {
2952  self::_writePref($usr_rec["usr_id"], "skin", $a_to_skin);
2953  self::_writePref($usr_rec["usr_id"], "style", $a_to_style);
2954  }
2955  }
global $ilDB
+ Here is the caller graph for this function:

◆ _readUsersProfileData()

static ilObjUser::_readUsersProfileData (   $a_user_ids)
static

STATIC METHOD get user data of selected users.

Parameters
arraydesired user ids
Returns
array of user data public

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

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

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

2780  {
2781  global $ilDB;
2782  $res = $ilDB->query("SELECT * FROM usr_data WHERE " .
2783  $ilDB->in("usr_id", $a_user_ids, false, "integer"));
2784  while ($row = $ilDB->fetchAssoc($res)) {
2785  $user_data["$row[usr_id]"] = $row;
2786  }
2787  return $user_data ? $user_data : array();
2788  }
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _removeItemFromDesktops()

static ilObjUser::_removeItemFromDesktops (   $a_id)
static

removes object from all user's desktops public

Parameters
integerref_id
Returns
array user_ids of all affected users

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

References $ilDB, $r, $row, $users, and array.

Referenced by ilUtil\removeItemFromDesktops().

3068  {
3069  global $ilDB;
3070 
3071  $r = $ilDB->queryF(
3072  "SELECT user_id FROM desktop_item WHERE item_id = %s",
3073  array("integer"),
3074  array($a_id)
3075  );
3076 
3077  $users = array();
3078 
3079  while ($row = $ilDB->fetchObject($r)) {
3080  $users[] = $row->user_id;
3081  } // while
3082 
3083  if (count($users) > 0) {
3084  $ilDB->manipulateF(
3085  "DELETE FROM desktop_item WHERE item_id = %s",
3086  array("integer"),
3087  array($a_id)
3088  );
3089  }
3090 
3091  return $users;
3092  }
$r
Definition: example_031.php:79
Create styles array
The data for the language used.
$users
Definition: authpage.php:44
global $ilDB
+ Here is the caller graph for this function:

◆ _resetLoginAttempts()

static ilObjUser::_resetLoginAttempts (   $a_usr_id)
static

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

References $ilDB, $query, and array.

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

4615  {
4616  global $ilDB;
4617 
4618  $query = "UPDATE usr_data SET login_attempts = 0 WHERE usr_id = %s";
4619  $affected = $ilDB->manipulateF($query, array('integer'), array($a_usr_id));
4620 
4621  if ($affected) {
4622  return true;
4623  } else {
4624  return false;
4625  }
4626  }
$query
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _setFeedPass()

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

Set news feed password for user.

Parameters
integeruser_id
stringnew password

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

References $ilDB.

4315  {
4316  global $ilDB;
4317 
4318  self::_writePref(
4319  $a_user_id,
4320  "priv_feed_pass",
4321  ($a_password=="") ? "" : md5($a_password)
4322  );
4323  }
global $ilDB

◆ _setUserInactive()

static ilObjUser::_setUserInactive (   $a_usr_id)
static

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

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

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

4655  {
4656  global $ilDB;
4657 
4658  $query = "UPDATE usr_data SET active = 0, inactivation_date = %s WHERE usr_id = %s";
4659  $affected = $ilDB->manipulateF($query, array('timestamp', 'integer'), array(ilUtil::now(), $a_usr_id));
4660 
4661  if ($affected) {
4662  return true;
4663  } else {
4664  return false;
4665  }
4666  }
static now()
Return current timestamp in Y-m-d H:i:s format.
$query
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _toggleActiveStatusOfUsers()

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

Toggle active status of users.

public

Parameters

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

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

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

3642  {
3643  global $ilDB;
3644 
3645  if (!is_array($a_usr_ids)) {
3646  return false;
3647  }
3648 
3649 
3650  if ($a_status) {
3651  $q = "UPDATE usr_data SET active = 1, inactivation_date = NULL WHERE " .
3652  $ilDB->in("usr_id", $a_usr_ids, false, "integer");
3653  $ilDB->manipulate($q);
3654  } else {
3655  $usrId_IN_usrIds = $ilDB->in("usr_id", $a_usr_ids, false, "integer");
3656 
3657  $q = "UPDATE usr_data SET active = 0 WHERE $usrId_IN_usrIds";
3658  $ilDB->manipulate($q);
3659 
3660  $queryString = "
3661  UPDATE usr_data
3662  SET inactivation_date = %s
3663  WHERE inactivation_date IS NULL
3664  AND $usrId_IN_usrIds
3665  ";
3666  $ilDB->manipulateF($queryString, array('timestamp'), array(ilUtil::now()));
3667  }
3668 
3669  return true;
3670  }
static now()
Return current timestamp in Y-m-d H:i:s format.
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _updateLastLogin()

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

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

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

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

References $ilDB, $query, array, and date.

5083  {
5084  if ($a_last_login !== null) {
5085  $last_login = $a_last_login;
5086  } else {
5087  $last_login = date('Y-m-d H:i:s');
5088  }
5089 
5090  global $ilDB;
5091 
5092  $query = "UPDATE usr_data SET last_login = %s WHERE usr_id = %s";
5093  $affected = $ilDB->manipulateF($query, array('timestamp', 'integer'), array($last_login, $a_usr_id));
5094 
5095  if ($affected) {
5096  return $last_login;
5097  } else {
5098  return false;
5099  }
5100  }
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
$query
Create styles array
The data for the language used.
global $ilDB

◆ _uploadPersonalPicture()

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

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

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

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

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

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

3807  {
3808  $webspace_dir = ilUtil::getWebspaceDir();
3809  $image_dir = $webspace_dir . "/usr_images";
3810  $store_file = "usr_" . $obj_id . "." . "jpg";
3811  $target_file = $image_dir . "/$store_file";
3812 
3813  chmod($tmp_file, 0770);
3814 
3815  // take quality 100 to avoid jpeg artefacts when uploading jpeg files
3816  // taking only frame [0] to avoid problems with animated gifs
3817  $show_file = "$image_dir/usr_" . $obj_id . ".jpg";
3818  $thumb_file = "$image_dir/usr_" . $obj_id . "_small.jpg";
3819  $xthumb_file = "$image_dir/usr_" . $obj_id . "_xsmall.jpg";
3820  $xxthumb_file = "$image_dir/usr_" . $obj_id . "_xxsmall.jpg";
3821 
3822  ilUtil::execConvert($tmp_file . "[0] -geometry 200x200 -quality 100 JPEG:" . $show_file);
3823  ilUtil::execConvert($tmp_file . "[0] -geometry 100x100 -quality 100 JPEG:" . $thumb_file);
3824  ilUtil::execConvert($tmp_file . "[0] -geometry 75x75 -quality 100 JPEG:" . $xthumb_file);
3825  ilUtil::execConvert($tmp_file . "[0] -geometry 30x30 -quality 100 JPEG:" . $xxthumb_file);
3826 
3827  // store filename
3828  self::_writePref($obj_id, "profile_image", $store_file);
3829 
3830  return true;
3831  }
static execConvert($args)
execute convert command
static getWebspaceDir($mode="filesystem")
get webspace directory
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _verifyRegistrationHash()

static ilObjUser::_verifyRegistrationHash (   $a_hash)
static

Verifies a registration hash.

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

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

References $ilDB, $res, $row, array, and time.

Referenced by ilStartUpGUI\_checkGoto().

4958  {
4959  global $ilDB;
4960 
4961  $res = $ilDB->queryf(
4962  '
4963  SELECT usr_id, create_date FROM usr_data
4964  WHERE reg_hash = %s',
4965  array('text'),
4966  array($a_hash)
4967  );
4968  while ($row = $ilDB->fetchAssoc($res)) {
4969  require_once 'Services/Registration/classes/class.ilRegistrationSettings.php';
4970  $oRegSettigs = new ilRegistrationSettings();
4971 
4972  if ((int) $oRegSettigs->getRegistrationHashLifetime() != 0 &&
4973  time() - (int) $oRegSettigs->getRegistrationHashLifetime() > strtotime($row['create_date'])) {
4974  require_once 'Services/Registration/exceptions/class.ilRegConfirmationLinkExpiredException.php';
4975  throw new ilRegConfirmationLinkExpiredException('reg_confirmation_hash_life_time_expired', $row['usr_id']);
4976  }
4977 
4978  $ilDB->manipulateF(
4979  '
4980  UPDATE usr_data
4981  SET reg_hash = %s
4982  WHERE usr_id = %s',
4983  array('text', 'integer'),
4984  array('', (int) $row['usr_id'])
4985  );
4986 
4987  return (int) $row['usr_id'];
4988  }
4989 
4990  require_once 'Services/Registration/exceptions/class.ilRegistrationHashNotFoundException.php';
4991  throw new ilRegistrationHashNotFoundException('reg_confirmation_hash_not_found');
4992  }
Class for user related exception handling in ILIAS.
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
global $ilDB
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
Class for user related exception handling in ILIAS.
+ Here is the caller graph for this function:

◆ _writeAuthMode()

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

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

References $ilDB, and array.

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

1993  {
1994  global $ilDB;
1995 
1996  $ilDB->manipulateF(
1997  "UPDATE usr_data " .
1998  " SET auth_mode = %s WHERE usr_id = %s",
1999  array("text", "integer"),
2000  array($a_auth_mode, $a_usr_id)
2001  );
2002  }
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _writeExternalAccount()

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

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

References $ilDB, and array.

Referenced by ilObjUserTest\testAuthAndEmailMethods().

1981  {
1982  global $ilDB;
1983 
1984  $ilDB->manipulateF(
1985  "UPDATE usr_data " .
1986  " SET ext_account = %s WHERE usr_id = %s",
1987  array("text", "integer"),
1988  array($a_ext_id, $a_usr_id)
1989  );
1990  }
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _writeHistory()

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

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

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

Referenced by updateLogin().

4693  {
4694  global $ilDB;
4695 
4696  $timestamp = time();
4697 
4698  $res = $ilDB->queryF(
4699  'SELECT * FROM loginname_history WHERE usr_id = %s AND login = %s AND history_date = %s',
4700  array('integer', 'text', 'integer'),
4701  array($a_usr_id, $a_login, $timestamp)
4702  );
4703 
4704  if ($ilDB->numRows($res) == 0) {
4705  $ilDB->manipulateF(
4706  '
4707  INSERT INTO loginname_history
4708  (usr_id, login, history_date)
4709  VALUES (%s, %s, %s)',
4710  array('integer', 'text', 'integer'),
4711  array($a_usr_id, $a_login, $timestamp)
4712  );
4713  }
4714 
4715  return true;
4716  }
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
foreach($mandatory_scripts as $file) $timestamp
Definition: buildRTE.php:81
global $ilDB
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _writePref()

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

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

References $ilDB, and array.

Referenced by ilChatroomBlockGUI\getChatroomSelectionList(), and ilBadgeProfileGUI\saveSettings().

1077  {
1078  global $ilDB;
1079  $ilDB->replace(
1080  "usr_pref",
1081  array(
1082  "usr_id" => array("integer", $a_usr_id),
1083  "keyword" => array("text", $a_keyword),
1084  ),
1085  array(
1086  "value" => array("text",$a_value)
1087  )
1088  );
1089 
1090  /*
1091  self::_deletePref($a_usr_id, $a_keyword);
1092  if(strlen($a_value))
1093  {
1094  $ilDB->manipulateF(
1095  'INSERT INTO usr_pref (usr_id, keyword, value) VALUES (%s, %s, %s)',
1096  array('integer', 'text', 'text'),
1097  array($a_usr_id, $a_keyword, $a_value)
1098  );
1099  }*/
1100  }
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ activateDeletionFlag()

ilObjUser::activateDeletionFlag ( )

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

References writePref().

5441  {
5442  $this->writePref("delete_flag", true);
5443  }
writePref($a_keyword, $a_value)
write userpref to user table private
+ 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 2999 of file class.ilObjUser.php.

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

3000  {
3001  ilObjUser::_addDesktopItem($this->getId(), $a_item_id, $a_type, $a_par);
3002  }
$a_type
Definition: workflow.php:92
getId()
get object id public
static _addDesktopItem($a_usr_id, $a_item_id, $a_type, $a_par="")
add an item to user&#39;s personal desktop
+ 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 3284 of file class.ilObjUser.php.

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

3291  {
3292  global $ilDB;
3293 
3294  if ($a_time == 0) {
3295  $a_time = date("Y-m-d H:i:s", time());
3296  }
3297 
3298  $item_set = $ilDB->queryF(
3299  "SELECT * FROM personal_clipboard WHERE " .
3300  "parent = %s AND item_id = %s AND type = %s AND user_id = %s",
3301  array("integer", "integer", "text", "integer"),
3302  array(0, $a_item_id, $a_type, $this->getId())
3303  );
3304 
3305  // only insert if item is not already in clipboard
3306  if (!$d = $item_set->fetchRow()) {
3307  $ilDB->manipulateF(
3308  "INSERT INTO personal_clipboard " .
3309  "(item_id, type, user_id, title, parent, insert_time, order_nr) VALUES " .
3310  " (%s,%s,%s,%s,%s,%s,%s)",
3311  array("integer", "text", "integer", "text", "integer", "timestamp", "integer"),
3312  array($a_item_id, $a_type, $this->getId(), $a_title, (int) $a_parent, $a_time, (int) $a_order_nr)
3313  );
3314  } else {
3315  $ilDB->manipulateF(
3316  "UPDATE personal_clipboard SET insert_time = %s " .
3317  "WHERE user_id = %s AND item_id = %s AND type = %s AND parent = 0",
3318  array("timestamp", "integer", "integer", "text"),
3319  array($a_time, $this->getId(), $a_item_id, $a_type)
3320  );
3321  }
3322  }
$a_type
Definition: workflow.php:92
getId()
get object id public
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
Create styles array
The data for the language used.
global $ilDB
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296
+ Here is the call graph for this function:

◆ addToPCClipboard()

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

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

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

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

3328  {
3329  global $ilDB;
3330  if ($a_time == 0) {
3331  $a_time = date("Y-m-d H:i:s", time());
3332  }
3333  $ilDB->insert("personal_pc_clipboard", array(
3334  "user_id" => array("integer", $this->getId()),
3335  "content" => array("clob", $a_content),
3336  "insert_time" => array("timestamp", $a_time),
3337  "order_nr" => array("integer", $a_nr)
3338  ));
3339  }
getId()
get object id public
$a_content
Definition: workflow.php:93
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
Create styles array
The data for the language used.
global $ilDB
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the call graph for this function:

◆ addUserDefinedFieldEntry()

ilObjUser::addUserDefinedFieldEntry ( )

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

References $ilDB.

Referenced by assignData().

4095  {
4096  global $ilDB;
4097 
4098  // not needed. no entry in udf_text/udf_clob means no value
4099 
4100  /* $query = "INSERT INTO udf_data (usr_id ) ".
4101  "VALUES( ".
4102  $ilDB->quote($this->getId(),'integer').
4103  ")";
4104  $res = $ilDB->manipulate($query);
4105  */
4106  return true;
4107  }
global $ilDB
+ Here is the caller graph for this function:

◆ assignData()

ilObjUser::assignData (   $a_data)

loads a record "user" from array public

Parameters
arrayuserdata

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

References $ilDB, $ilErr, ilObject\$lng, $passwd, addUserDefinedFieldEntry(), array, getAuthMode(), getBirthday(), getExternalAccount(), ilUserPasswordManager\getInstance(), getPasswd(), getPasswordEncodingType(), getPasswordSalt(), getProfileIncomplete(), getStoredActive(), getTimeLimitFrom(), getTimeLimitMessage(), getTimeLimitOwner(), getTimeLimitUnlimited(), getTimeLimitUntil(), IL_PASSWD_CRYPTED, IL_PASSWD_PLAIN, ilUtil\now(), read(), 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(), setSecondEmail(), setSelectedCountry(), setStreet(), setTimeLimitFrom(), setTimeLimitMessage(), setTimeLimitOwner(), setTimeLimitUnlimited(), setTimeLimitUntil(), setUTitle(), setZipcode(), syncActive(), League\Flysystem\Adapter\Polyfill\update(), ilObject\update(), updateMultiTextFields(), updateUserDefinedFields(), and writePrefs().

Referenced by read().

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

◆ buildTextFromArray()

ilObjUser::buildTextFromArray (   $a_attr)
protected

Convert multi-text values to plain text.

Parameters
string$a_attr
Returns
string

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

References $current.

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

5570  {
5571  $current = $this->$a_attr;
5572  if (is_array($current) && sizeof($current)) {
5573  return implode(", ", $current);
5574  }
5575  }
+ Here is the caller graph for this function:

◆ checkTimeLimit()

ilObjUser::checkTimeLimit ( )

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

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

Referenced by ilAuthFrontend\checkTimeLimit().

2266  {
2267  if ($this->getTimeLimitUnlimited()) {
2268  return true;
2269  }
2270  if ($this->getTimeLimitFrom() < time() and $this->getTimeLimitUntil() > time()) {
2271  return true;
2272  }
2273  return false;
2274  }
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkUserId()

ilObjUser::checkUserId ( )

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

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

2481  {
2482  global $ilAuth, $ilSetting;
2483 
2486  if ($id > 0) {
2487  return $id;
2488  }
2489  return false;
2490  }
$login
all user related data in single vars public
static _lookupId($a_user_str)
Lookup id by login.
static getLoginFromAuth()
Gets the username from $ilAuth, and converts it into an ILIAS login name.
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:

◆ clipboardDeleteAll()

ilObjUser::clipboardDeleteAll ( )

Delete objects of type for user.

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

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

Referenced by delete().

3405  {
3406  global $ilDB;
3407 
3408  $ilDB->manipulateF("DELETE FROM personal_clipboard WHERE " .
3409  "user_id = %s", array("integer"), array($this->getId()));
3410  }
getId()
get object id public
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clipboardDeleteObjectsOfType()

ilObjUser::clipboardDeleteObjectsOfType (   $a_type)

Delete objects of type for user.

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

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

3390  {
3391  global $ilDB;
3392 
3393  $ilDB->manipulateF(
3394  "DELETE FROM personal_clipboard WHERE " .
3395  "type = %s AND user_id = %s",
3396  array("text", "integer"),
3397  array($a_type, $this->getId())
3398  );
3399  }
$a_type
Definition: workflow.php:92
getId()
get object id public
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:

◆ clipboardHasObjectsOfType()

ilObjUser::clipboardHasObjectsOfType (   $a_type)

Check whether clipboard has objects of a certain type.

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

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

3370  {
3371  global $ilDB;
3372 
3373  $set = $ilDB->queryF(
3374  "SELECT * FROM personal_clipboard WHERE " .
3375  "parent = %s AND type = %s AND user_id = %s",
3376  array("integer", "text", "integer"),
3377  array(0, $a_type, $this->getId())
3378  );
3379  if ($rec = $ilDB->fetchAssoc($set)) {
3380  return true;
3381  }
3382 
3383  return false;
3384  }
$a_type
Definition: workflow.php:92
getId()
get object id public
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:

◆ copyProfilePicturesToDirectory()

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

Get profile picture direcotory.

Parameters

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

References array, and ilUtil\getWebspaceDir().

Referenced by ilUserDataSet\getXmlRecord().

3951  {
3952  $a_dir = trim(str_replace("..", "", $a_dir));
3953  if ($a_dir == "" || !is_dir($a_dir)) {
3954  return;
3955  }
3956 
3957  $webspace_dir = ilUtil::getWebspaceDir();
3958  $image_dir = $webspace_dir . "/usr_images";
3959  $images = array(
3960  "upload_" . $a_user_id . "pic",
3961  "usr_" . $a_user_id . "." . "jpg",
3962  "usr_" . $a_user_id . "_small.jpg",
3963  "usr_" . $a_user_id . "_xsmall.jpg",
3964  "usr_" . $a_user_id . "_xxsmall.jpg",
3965  "upload_" . $a_user_id);
3966  foreach ($images as $image) {
3967  if (is_file($image_dir . "/" . $image)) {
3968  copy($image_dir . "/" . $image, $a_dir . "/" . $image);
3969  }
3970  }
3971  }
Create styles array
The data for the language used.
static getWebspaceDir($mode="filesystem")
get webspace directory
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ delete()

ilObjUser::delete ( )

deletes a user public

Parameters
integeruser_id

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

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

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

◆ deleteMultiTextFields()

ilObjUser::deleteMultiTextFields ( )
protected

Remove multi-text values from DB.

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

References $ilDB, and ilObject\getId().

Referenced by delete(), and updateMultiTextFields().

5660  {
5661  global $ilDB;
5662 
5663  if (!$this->getId()) {
5664  return;
5665  }
5666 
5667  $ilDB->manipulate("DELETE FROM usr_data_multi" .
5668  " WHERE usr_id = " . $ilDB->quote($this->getId(), "integer"));
5669  }
getId()
get object id public
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deletePref()

ilObjUser::deletePref (   $a_keyword)

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

Parameters
stringkeyword

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

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

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

◆ deleteUserDefinedFieldEntries()

ilObjUser::deleteUserDefinedFieldEntries ( )

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

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

Referenced by delete().

4110  {
4111  global $ilDB;
4112 
4113  include_once("./Services/User/classes/class.ilUserDefinedData.php");
4115 
4116  // wrong place...
4117  /* $query = "DELETE FROM udf_data ".
4118  "WHERE usr_id = ".$ilDB->quote($this->getId(),'integer');
4119  $res = $ilDB->manipulate($query);*/
4120 
4121  return true;
4122  }
getId()
get object id public
static deleteEntriesOfUser($a_user_id)
Delete data of user.
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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

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

Referenced by ilObjGroup\leaveGroup().

3057  {
3058  ilObjUser::_dropDesktopItem($this->getId(), $a_item_id, $a_type);
3059  }
$a_type
Definition: workflow.php:92
getId()
get object id public
static _dropDesktopItem($a_usr_id, $a_item_id, $a_type)
drop an item from user&#39;s personal desktop
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportPersonalData()

ilObjUser::exportPersonalData ( )

Export personal data.

Parameters

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

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

5176  {
5177  include_once("./Services/Export/classes/class.ilExport.php");
5178  $exp = new ilExport();
5179  $dir = ilExport::_getExportDirectory($this->getId(), "xml", "usr", "personal_data");
5180  ilUtil::delDir($dir, true);
5181  $title = $this->getLastname() . ", " . $this->getLastname() . " [" . $this->getLogin() . "]";
5182  $exp->exportEntity(
5183  "personal_data",
5184  $this->getId(),
5185  "",
5186  "Services/User",
5187  $title,
5188  $dir
5189  );
5190  }
getLogin()
get login / username public
getLastname()
get lastname public
getId()
get object id public
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
+ Here is the call graph for this function:

◆ findInterests()

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

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

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

Referenced by ilPublicUserProfileGUI\getAutocompleteResult().

5672  {
5673  global $ilDB;
5674 
5675  $res = array();
5676 
5677  $sql = "SELECT DISTINCT(value)" .
5678  " FROM usr_data_multi" .
5679  " WHERE " . $ilDB->like("value", "text", "%" . $a_term . "%");
5680  if ($a_field_id) {
5681  $sql .= " AND field_id = " . $ilDB->quote($a_field_id, "text");
5682  }
5683  if ($a_user_id) {
5684  $sql .= " AND usr_id <> " . $ilDB->quote($a_user_id, "integer");
5685  }
5686  $sql .= " ORDER BY value";
5687  $set = $ilDB->query($sql);
5688  while ($row = $ilDB->fetchAssoc($set)) {
5689  $res[] = $row["value"];
5690  }
5691 
5692  return $res;
5693  }
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ getActive()

ilObjUser::getActive ( )

get user active state public

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

References $active.

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

2144  {
2145  return $this->active;
2146  }
+ Here is the caller graph for this function:

◆ getAgreeDate()

ilObjUser::getAgreeDate ( )

get the date when the user accepted the user agreement public

Returns
string date of last update

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

References $agree_date.

2104  {
2105  return $this->agree_date;
2106  }

◆ getApproveDate()

ilObjUser::getApproveDate ( )

get the date when the user account was approved public

Returns
string approve date

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

References $approve_date.

Referenced by ilSoapUserAdministration\__readUserData().

2093  {
2094  return $this->approve_date;
2095  }
+ Here is the caller graph for this function:

◆ getAuthMode()

ilObjUser::getAuthMode (   $a_auth_key = false)

get auth mode public

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

References $auth_mode, and ilAuthUtils\_getAuthMode().

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

3564  {
3565  if (!$a_auth_key) {
3566  return $this->auth_mode;
3567  }
3568 
3569  include_once('./Services/Authentication/classes/class.ilAuthUtils.php');
3570  return ilAuthUtils::_getAuthMode($this->auth_mode);
3571  }
static _getAuthMode($a_auth_mode, $a_db_handler='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBirthday()

ilObjUser::getBirthday ( )

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

References $birthday.

Referenced by assignData().

5005  {
5006  return $this->birthday;
5007  }
+ Here is the caller graph for this function:

◆ getCity()

ilObjUser::getCity ( )

get city public

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

References $city.

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

1646  {
1647  return $this->city;
1648  }
+ Here is the caller graph for this function:

◆ getClientIP()

ilObjUser::getClientIP ( )

get client ip number public

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

References $client_ip.

Referenced by ilAuthFrontend\checkIp().

1801  {
1802  return $this->client_ip;
1803  }
+ Here is the caller graph for this function:

◆ getClipboardChilds()

ilObjUser::getClipboardChilds (   $a_parent,
  $a_insert_time 
)

Get childs of an item.

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

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

3452  {
3453  global $ilDB, $ilUser;
3454 
3455  $objs = $ilDB->queryF(
3456  "SELECT * FROM personal_clipboard WHERE " .
3457  "user_id = %s AND parent = %s AND insert_time = %s " .
3458  " ORDER BY order_nr",
3459  array("integer", "integer", "timestamp"),
3460  array($ilUser->getId(), (int) $a_parent, $a_insert_time)
3461  );
3462  $objects = array();
3463  while ($obj = $ilDB->fetchAssoc($objs)) {
3464  if ($obj["type"] == "mob") {
3465  $obj["title"] = ilObject::_lookupTitle($obj["item_id"]);
3466  }
3467  $objects[] = array("id" => $obj["item_id"],
3468  "type" => $obj["type"], "title" => $obj["title"], "insert_time" => $obj["insert_time"]);
3469  }
3470  return $objects;
3471  }
static _lookupTitle($a_id)
lookup object title
$ilUser
Definition: imgupload.php:18
Create styles array
The data for the language used.
global $ilDB
+ 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 3415 of file class.ilObjUser.php.

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

3416  {
3417  global $ilDB;
3418 
3419  $par = "";
3420  if ($a_top_nodes_only) {
3421  $par = " AND parent = " . $ilDB->quote(0, "integer") . " ";
3422  }
3423 
3424  $type_str = ($a_type != "")
3425  ? " AND type = " . $ilDB->quote($a_type, "text") . " "
3426  : "";
3427  $q = "SELECT * FROM personal_clipboard WHERE " .
3428  "user_id = " . $ilDB->quote($this->getId(), "integer") . " " .
3429  $type_str . $par .
3430  " ORDER BY order_nr";
3431  $objs = $ilDB->query($q);
3432  $objects = array();
3433  while ($obj = $ilDB->fetchAssoc($objs)) {
3434  if ($obj["type"] == "mob") {
3435  $obj["title"] = ilObject::_lookupTitle($obj["item_id"]);
3436  }
3437  if ($obj["type"] == "incl") {
3438  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
3439  $obj["title"] = ilMediaPoolPage::lookupTitle($obj["item_id"]);
3440  }
3441  $objects[] = array("id" => $obj["item_id"],
3442  "type" => $obj["type"], "title" => $obj["title"],
3443  "insert_time" => $obj["insert_time"]);
3444  }
3445  return $objects;
3446  }
static _lookupTitle($a_id)
lookup object title
static lookupTitle($a_page_id)
Lookup title.
$a_type
Definition: workflow.php:92
getId()
get object id public
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:

◆ getComment()

ilObjUser::getComment ( )

get referral comment public

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

References $referral_comment.

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

2072  {
2073  return $this->referral_comment;
2074  }
+ Here is the caller graph for this function:

◆ getCountry()

ilObjUser::getCountry ( )

Get country (free text)

public

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

References $country.

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

1686  {
1687  return $this->country;
1688  }
+ 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 2008 of file class.ilObjUser.php.

References $_SESSION.

2009  {
2010  return $_SESSION['lang'];
2011  }
$_SESSION["AccountId"]

◆ getDateFormat()

ilObjUser::getDateFormat ( )

get date format

public

Returns

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

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

1157  {
1158  if ($format = $this->getPref('date_format')) {
1159  return $format;
1160  } else {
1161  include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
1162  $settings = ilCalendarSettings::_getInstance();
1163  return $settings->getDefaultDateFormat();
1164  }
1165  }
static _getInstance()
get singleton instance
$format
Definition: metadata.php:141
getPref($a_keyword)
get a user preference
+ Here is the call graph for this function:

◆ getDepartment()

ilObjUser::getDepartment ( )

get department public

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

References $department.

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

1608  {
1609  return $this->department;
1610  }
+ Here is the caller graph for this function:

◆ getDesktopItems()

ilObjUser::getDesktopItems (   $a_types = "")

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

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

3170  {
3171  return $this->_lookupDesktopItems($this->getId(), $a_types);
3172  }
getId()
get object id public
static _lookupDesktopItems($user_id, $a_types="")
get all desktop items of user and specified type
+ 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.

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()

◆ getExternalAccount()

ilObjUser::getExternalAccount ( )

get external account

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

public

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

Referenced by assignData(), and ilECSAppEventListener\handleMembership().

3593  {
3594  return $this->ext_account;
3595  }
+ Here is the caller graph for this function:

◆ getFax()

ilObjUser::getFax ( )

get fax public

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

References $fax.

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

1782  {
1783  return $this->fax;
1784  }
+ Here is the caller graph for this function:

◆ getFirstLettersOfLastnames()

static ilObjUser::getFirstLettersOfLastnames ( )
static

Get first letters of all lastnames.

Parameters

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

References $ilDB, and array.

Referenced by ilObjUserFolderGUI\viewObject().

5121  {
5122  global $ilDB;
5123 
5124  $q = "SELECT DISTINCT " . $ilDB->upper($ilDB->substr("lastname", 1, 1)) . " let" .
5125  " FROM usr_data" .
5126  " WHERE usr_id <> " . $ilDB->quote(ANONYMOUS_USER_ID, "integer") .
5127  " ORDER BY let";
5128  $let_set = $ilDB->query($q);
5129 
5130  $lets = array();
5131  while ($let_rec = $ilDB->fetchAssoc($let_set)) {
5132  $let[$let_rec["let"]] = $let_rec["let"];
5133  }
5134  return $let;
5135  }
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ getFirstname()

ilObjUser::getFirstname ( )

get firstname public

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

References $firstname.

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

1551  {
1552  return $this->firstname;
1553  }
+ Here is the caller graph for this function:

◆ getFullname()

ilObjUser::getFullname (   $a_max_strlen = 0)

get fullname public

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

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

References ilUtil\stripSlashes().

Referenced by shibUser\createFields(), and ilAccountRegistrationMail\sendLanguageVariableBasedAccountMail().

1418  {
1419  if (!$a_max_strlen) {
1420  return ilUtil::stripSlashes($this->fullname);
1421  }
1422 
1423  if (strlen($this->fullname) <= $a_max_strlen) {
1424  return ilUtil::stripSlashes($this->fullname);
1425  }
1426 
1427  if ((strlen($this->utitle) + strlen($this->lastname) + 4) <= $a_max_strlen) {
1428  return ilUtil::stripSlashes($this->utitle . " " . substr($this->firstname, 0, 1) . ". " . $this->lastname);
1429  }
1430 
1431  if ((strlen($this->firstname) + strlen($this->lastname) + 1) <= $a_max_strlen) {
1432  return ilUtil::stripSlashes($this->firstname . " " . $this->lastname);
1433  }
1434 
1435  if ((strlen($this->lastname) + 3) <= $a_max_strlen) {
1436  return ilUtil::stripSlashes(substr($this->firstname, 0, 1) . ". " . $this->lastname);
1437  }
1438 
1439  return ilUtil::stripSlashes(substr($this->lastname, 0, $a_max_strlen));
1440  }
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGender()

ilObjUser::getGender ( )

get gender public

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

References $gender.

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

1509  {
1510  return $this->gender;
1511  }
+ Here is the caller graph for this function:

◆ getGeneralInterests()

ilObjUser::getGeneralInterests ( )

Get general interests.

Returns
array $value

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

References $interests_general.

Referenced by updateMultiTextFields().

5489  {
5490  return $this->interests_general;
5491  }
+ Here is the caller graph for this function:

◆ getGeneralInterestsAsText()

ilObjUser::getGeneralInterestsAsText ( )

Get general interests as plain text.

Returns
string

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

References buildTextFromArray().

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

◆ getHobby()

ilObjUser::getHobby ( )

get hobby public

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

References $hobby.

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

1891  {
1892  return $this->hobby;
1893  }
+ Here is the caller graph for this function:

◆ getInactivationDate()

ilObjUser::getInactivationDate ( )

getter for inactivation date

Returns
string $inactivation_date

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

References $inactivation_date.

5328  {
5329  return $this->inactivation_date;
5330  }

◆ getInstitution()

ilObjUser::getInstitution ( )

get institution public

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

References $institution.

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

1589  {
1590  return $this->institution;
1591  }
+ Here is the caller graph for this function:

◆ getLanguage()

ilObjUser::getLanguage ( )

returns a 2char-language-string public

Returns
string language

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

Referenced by ilSoapUserAdministration\__readUserData(), ilNotificationConfig\getUserInstance(), ilMailTemplateContext\initLanguage(), ilAccountRegistrationMail\sendLanguageVariableBasedAccountMail(), and ilAccountRegistrationMail\trySendingUserDefinedAccountMail().

1912  {
1913  return $this->prefs["language"];
1914  }
+ Here is the caller graph for this function:

◆ getLastLogin()

ilObjUser::getLastLogin ( )

returns last login date public

Returns
string date

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

Referenced by ilSoapUserAdministration\__readUserData().

2039  {
2040  return $this->last_login;
2041  }
+ Here is the caller graph for this function:

◆ getLastname()

ilObjUser::getLastname ( )

get lastname public

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

References $lastname.

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

1570  {
1571  return $this->lastname;
1572  }
+ Here is the caller graph for this function:

◆ getLastPasswordChangeTS()

ilObjUser::getLastPasswordChangeTS ( )

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

References $last_password_change_ts.

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

1954  {
1956  }
+ Here is the caller graph for this function:

◆ getLastUpdate()

ilObjUser::getLastUpdate ( )

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

References ilObject\$last_update.

Referenced by ilSoapUserAdministration\__readUserData().

2053  {
2054  return $this->last_update;
2055  }
+ Here is the caller graph for this function:

◆ getLatitude()

ilObjUser::getLatitude ( )

Get Latitude.

Returns
string Latitude

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

References $latitude.

Referenced by ilPersonalProfileGUI\addLocationToForm().

2411  {
2412  return $this->latitude;
2413  }
+ Here is the caller graph for this function:

◆ getLocationZoom()

ilObjUser::getLocationZoom ( )

Get Location Zoom.

Returns
int Location Zoom

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

References $loc_zoom.

Referenced by ilPersonalProfileGUI\addLocationToForm().

2451  {
2452  return $this->loc_zoom;
2453  }
+ Here is the caller graph for this function:

◆ getLogin()

◆ getLoginAttempts()

ilObjUser::getLoginAttempts ( )

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

References $login_attempts.

2260  {
2261  return $this->login_attempts;
2262  }

◆ getLoginByUserId()

ilObjUser::getLoginByUserId (   $a_userid)

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

References $login, and _lookupLogin().

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

◆ getLoginFromAuth()

static ilObjUser::getLoginFromAuth ( )
staticprivate

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

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

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

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

2496  {
2497  global $ilAuth;
2498 
2499  $uid = $GLOBALS['DIC']['ilAuthSession']->getUserId();
2501 
2502  // BEGIN WebDAV: Strip Microsoft Domain Names from logins
2503  require_once('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
2505  $login = self::toUsernameWithoutDomain($login);
2506  }
2507  return $login;
2508  }
static _lookupLogin($a_user_id)
lookup login
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
$login
all user related data in single vars public
static _isActive()
Static getter.
+ 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 2430 of file class.ilObjUser.php.

References $longitude.

Referenced by ilPersonalProfileGUI\addLocationToForm().

2431  {
2432  return $this->longitude;
2433  }
+ Here is the caller graph for this function:

◆ getLookingForHelp()

ilObjUser::getLookingForHelp ( )

Get help looking for.

Returns
array $value

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

References $interests_help_looking.

Referenced by updateMultiTextFields().

5549  {
5551  }
+ Here is the caller graph for this function:

◆ getLookingForHelpAsText()

ilObjUser::getLookingForHelpAsText ( )

Get help looking for as plain text.

Returns
string

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

References buildTextFromArray().

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

◆ getMatriculation()

ilObjUser::getMatriculation ( )

get matriculation number public

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

References $matriculation.

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

1820  {
1821  return $this->matriculation;
1822  }
+ Here is the caller graph for this function:

◆ getOfferingHelp()

ilObjUser::getOfferingHelp ( )

Get help offering.

Returns
array $value

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

References $interests_help_offered.

Referenced by updateMultiTextFields().

5519  {
5521  }
+ Here is the caller graph for this function:

◆ getOfferingHelpAsText()

ilObjUser::getOfferingHelpAsText ( )

Get help offering as plain text.

Returns
string

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

References buildTextFromArray().

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

◆ getOrgUnitsRepresentation()

ilObjUser::getOrgUnitsRepresentation ( )
Returns
String

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

References ilObject\getId().

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

◆ getPasswd()

ilObjUser::getPasswd ( )

get password

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

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

References $passwd.

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

1480  {
1481  return $this->passwd;
1482  }
+ Here is the caller graph for this function:

◆ getPasswdType()

ilObjUser::getPasswdType ( )

get password type

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

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

References $passwd_type.

Referenced by ilSoapUserAdministration\__readUserData().

1490  {
1491  return $this->passwd_type;
1492  }
+ Here is the caller graph for this function:

◆ getPasswordAge()

ilObjUser::getPasswordAge ( )

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

References getLastPasswordChangeTS(), and time.

2350  {
2351  $current_ts = time();
2352  $pass_change_ts = $this->getLastPasswordChangeTS();
2353  $password_age = (int) (($current_ts - $pass_change_ts) / 86400);
2354  return $password_age;
2355  }
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the call graph for this function:

◆ getPasswordEncodingType()

ilObjUser::getPasswordEncodingType ( )
Returns
string

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

References $password_encoding_type.

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

289  {
291  }
+ Here is the caller graph for this function:

◆ getPasswordSalt()

ilObjUser::getPasswordSalt ( )
Returns
string|null

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

References $password_salt.

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

305  {
306  return $this->password_salt;
307  }
+ 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 3344 of file class.ilObjUser.php.

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

3345  {
3346  global $ilDB;
3347 
3348  $set = $ilDB->queryF("SELECT MAX(insert_time) mtime FROM personal_pc_clipboard " .
3349  " WHERE user_id = %s", array("integer"), array($this->getId()));
3350  $row = $ilDB->fetchAssoc($set);
3351 
3352  $set = $ilDB->queryF(
3353  "SELECT * FROM personal_pc_clipboard " .
3354  " WHERE user_id = %s AND insert_time = %s ORDER BY order_nr ASC",
3355  array("integer", "timestamp"),
3356  array($this->getId(), $row["mtime"])
3357  );
3358  $content = array();
3359  while ($row = $ilDB->fetchAssoc($set)) {
3360  $content[] = $row["content"];
3361  }
3362 
3363  return $content;
3364  }
getId()
get object id public
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:

◆ getPersonalDataExportFile()

ilObjUser::getPersonalDataExportFile ( )

Get personal data export file.

Parameters

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

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

Referenced by sendPersonalDataFile().

5199  {
5200  include_once("./Services/Export/classes/class.ilExport.php");
5201  $dir = ilExport::_getExportDirectory($this->getId(), "xml", "usr", "personal_data");
5202  if (!is_dir($dir)) {
5203  return "";
5204  }
5205  foreach (ilUtil::getDir($dir) as $entry) {
5206  if (is_int(strpos($entry["entry"], ".zip"))) {
5207  return $entry["entry"];
5208  }
5209  }
5210 
5211  return "";
5212  }
static getDir($a_dir, $a_rec=false, $a_sub_dir="")
get directory
getId()
get object id public
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPersonalPicturePath()

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

Get path to personal picture.

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

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

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

References $DIC, $file, $firstname, $in, $lastname, $login, $res, $row, array, defined, ilObject\getId(), ilUtil\getWebspaceDir(), ilWACSignedPath\signFile(), and ilStr\subStr().

Referenced by ilForumAuthorInformation\getUserImagePath().

3843  {
3844  if (isset(self::$personal_image_cache[$this->getId()][$a_size][(int) $a_force_pic])) {
3845  return self::$personal_image_cache[$this->getId()][$a_size][(int) $a_force_pic];
3846  }
3847 
3848  self::$personal_image_cache[$this->getId()][$a_size][(int) $a_force_pic] = ilObjUser::_getPersonalPicturePath($this->getId(), $a_size, $a_force_pic);
3849 
3850  return self::$personal_image_cache[$this->getId()][$a_size][(int) $a_force_pic];
3851  }
getId()
get object id public
+ 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 public

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

References $phone_home.

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

1744  {
1745  return $this->phone_home;
1746  }
+ Here is the caller graph for this function:

◆ getPhoneMobile()

ilObjUser::getPhoneMobile ( )

get mobile phone public

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

References $phone_mobile.

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

1763  {
1764  return $this->phone_mobile;
1765  }
+ Here is the caller graph for this function:

◆ getPhoneOffice()

ilObjUser::getPhoneOffice ( )

get office phone public

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

References $phone_office.

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

1725  {
1726  return $this->phone_office;
1727  }
+ Here is the caller graph for this function:

◆ getPref()

ilObjUser::getPref (   $a_keyword)

get a user preference

Parameters
stringname of parameter public

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

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

1186  {
1187  if (array_key_exists($a_keyword, $this->prefs)) {
1188  return $this->prefs[$a_keyword];
1189  } else {
1190  return false;
1191  }
1192  }
+ Here is the caller graph for this function:

◆ getProfileIncomplete()

ilObjUser::getProfileIncomplete ( )

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

Referenced by assignData().

2280  {
2281  if ($this->id == ANONYMOUS_USER_ID) {
2282  return false;
2283  }
2284  return $this->profile_incomplete;
2285  }
+ Here is the caller graph for this function:

◆ getProfileStatusOfUsers()

static ilObjUser::getProfileStatusOfUsers (   $a_user_ids)
static

Get profile status.

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

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

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

Referenced by ilInternalLink\searchUsers().

5705  {
5706  global $DIC;
5707 
5708  $ilDB = $DIC->database();
5709 
5710  $set = $ilDB->query(
5711  "SELECT * FROM usr_pref " .
5712  " WHERE keyword = " . $ilDB->quote("public_profile", "text") .
5713  " AND " . $ilDB->in("usr_id", $a_user_ids, false, "integer")
5714  );
5715  $r = array(
5716  "global" => array(),
5717  "local" => array(),
5718  "public" => array(),
5719  "not_public" => array()
5720  );
5721  while ($rec = $ilDB->fetchAssoc($set)) {
5722  if ($rec["value"] == "g") {
5723  $r["global"][] = $rec["usr_id"];
5724  $r["public"][] = $rec["usr_id"];
5725  }
5726  if ($rec["value"] == "y") {
5727  $r["local"][] = $rec["usr_id"];
5728  $r["public"][] = $rec["usr_id"];
5729  }
5730  }
5731  foreach ($a_user_ids as $id) {
5732  if (!in_array($id, $r["public"])) {
5733  $r["not_public"][] = $id;
5734  }
5735  }
5736 
5737  return $r;
5738  }
global $DIC
Definition: saml.php:7
$r
Definition: example_031.php:79
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ getPublicName()

ilObjUser::getPublicName ( )

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

Returns
string

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

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

4684  {
4685  if ($this->hasPublicProfile()) {
4686  return $this->getFirstname() . " " . $this->getLastname() . " (" . $this->getLogin() . ")";
4687  } else {
4688  return $this->getLogin();
4689  }
4690  }
getLogin()
get login / username public
getFirstname()
get firstname public
getLastname()
get lastname public
hasPublicProfile()
returns true if public is profile, false otherwise
+ Here is the call graph for this function:

◆ getSecondEmail()

ilObjUser::getSecondEmail ( )
Returns
null|string

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

References $second_email.

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

1864  {
1865  return $this->second_email;
1866  }
+ Here is the caller graph for this function:

◆ getSelectedCountry()

ilObjUser::getSelectedCountry ( )

Get selected country (selection drop down)

Returns
string selected country

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

References $sel_country.

Referenced by deleteUserDefinedFieldEntries().

1706  {
1707  return $this->sel_country;
1708  }
+ Here is the caller graph for this function:

◆ getStoredActive()

ilObjUser::getStoredActive (   $a_id)

get user active state

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

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

References $active, and _lookup().

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

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

◆ getStreet()

ilObjUser::getStreet ( )

get street public

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

References $street.

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

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

◆ getTimeFormat()

ilObjUser::getTimeFormat ( )

get time format

public

Returns

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

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

1140  {
1141  if ($format = $this->getPref('time_format')) {
1142  return $format;
1143  } else {
1144  include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
1145  $settings = ilCalendarSettings::_getInstance();
1146  return $settings->getDefaultTimeFormat();
1147  }
1148  }
static _getInstance()
get singleton instance
$format
Definition: metadata.php:141
getPref($a_keyword)
get a user preference
+ Here is the call graph for this function:

◆ getTimeLimitFrom()

ilObjUser::getTimeLimitFrom ( )

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

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

2226  {
2227  return $this->time_limit_from;
2228  }
+ Here is the caller graph for this function:

◆ getTimeLimitMessage()

ilObjUser::getTimeLimitMessage ( )

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

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

2250  {
2251  return $this->time_limit_message;
2252  }
+ Here is the caller graph for this function:

◆ getTimeLimitOwner()

ilObjUser::getTimeLimitOwner ( )

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

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

2218  {
2219  return $this->time_limit_owner ? $this->time_limit_owner : 7;
2220  }
+ Here is the caller graph for this function:

◆ getTimeLimitUnlimited()

ilObjUser::getTimeLimitUnlimited ( )

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

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

2242  {
2243  return $this->time_limit_unlimited;
2244  }
+ Here is the caller graph for this function:

◆ getTimeLimitUntil()

ilObjUser::getTimeLimitUntil ( )

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

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

2234  {
2235  return $this->time_limit_until;
2236  }
+ Here is the caller graph for this function:

◆ getTimeZone()

ilObjUser::getTimeZone ( )

get timezone of user

public

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

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

1123  {
1124  if ($tz = $this->getPref('user_tz')) {
1125  return $tz;
1126  } else {
1127  include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
1128  $settings = ilCalendarSettings::_getInstance();
1129  return $settings->getDefaultTimeZone();
1130  }
1131  }
static _getInstance()
get singleton instance
getPref($a_keyword)
get a user preference
+ Here is the call graph for this function:

◆ getUserDefinedData()

ilObjUser::getUserDefinedData ( )

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

References array.

Referenced by deleteUserDefinedFieldEntries().

4027  {
4028  return $this->user_defined_data ? $this->user_defined_data : array();
4029  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ 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 public

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

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

Referenced by ilObjUserTest\testAuthAndEmailMethods().

2606  {
2607  global $ilDB;
2608 
2609  $res = $ilDB->queryF("SELECT usr_id FROM usr_data " .
2610  "WHERE email = %s", array("text"), array($a_email));
2611 
2612  $row = $ilDB->fetchObject($res);
2613  return $row->usr_id ? $row->usr_id : 0;
2614  }
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ getUserIdByLogin()

static ilObjUser::getUserIdByLogin (   $a_login)
static

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

References _lookupId().

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

2565  {
2566  return (int) ilObjUser::_lookupId($a_login);
2567  }
static _lookupId($a_user_str)
Lookup id by login.
+ 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 5384 of file class.ilObjUser.php.

References $ilDB, $ret, $users, and array.

Referenced by ilAwarenessUserCollector\collectUsers().

5385  {
5386  global $ilDB;
5387 
5388  $date_is = ($a_agreed)
5389  ? "IS NOT NULL"
5390  : "IS NULL";
5391 
5392  $users = (is_array($a_users))
5393  ? " AND " . $ilDB->in("usr_id", $a_users, false, "integer")
5394  : "";
5395 
5396  $set = $ilDB->query("SELECT usr_id FROM usr_data " .
5397  " WHERE agree_date " . $date_is .
5398  $users);
5399  $ret = array();
5400  while ($rec = $ilDB->fetchAssoc($set)) {
5401  $ret[] = $rec["usr_id"];
5402  }
5403  return $ret;
5404  }
Create styles array
The data for the language used.
$users
Definition: authpage.php:44
global $ilDB
$ret
Definition: parser.php:6
+ Here is the caller graph for this function:

◆ getUserSubsetByPreferenceValue()

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

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

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

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

References $ilDB, $users, and array.

Referenced by ilAwarenessUserCollector\collectUsers().

4597  {
4598  global $ilDB;
4599 
4600  $users = array();
4601  $set = $ilDB->query(
4602  "SELECT usr_id FROM usr_pref " .
4603  " WHERE keyword = " . $ilDB->quote($a_keyword, "text") .
4604  " AND " . $ilDB->in("usr_id", $a_user_ids, false, "integer") .
4605  " AND value = " . $ilDB->quote($a_val, "text")
4606  );
4607  while ($rec = $ilDB->fetchAssoc($set)) {
4608  $users[] = $rec["usr_id"];
4609  }
4610  return $users;
4611  }
Create styles array
The data for the language used.
$users
Definition: authpage.php:44
global $ilDB
+ Here is the caller graph for this function:

◆ getUTitle()

ilObjUser::getUTitle ( )

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

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

References $utitle.

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

1532  {
1533  return $this->utitle;
1534  }
+ Here is the caller graph for this function:

◆ getZipcode()

ilObjUser::getZipcode ( )

get zipcode public

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

References $zipcode.

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

1665  {
1666  return $this->zipcode;
1667  }
+ Here is the caller graph for this function:

◆ hasActiveSession()

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

Check for simultaneous login.

Returns
bool

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

References $ilDB, $row, array, and time.

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

2462  {
2463  global $ilDB;
2464 
2465  $set = $ilDB->queryf(
2466  '
2467  SELECT COUNT(*) session_count
2468  FROM usr_session WHERE user_id = %s AND expires > %s AND session_id != %s ',
2469  array('integer', 'integer', 'text'),
2470  array($a_user_id, time(), $a_session_id)
2471  );
2472  $row = $ilDB->fetchAssoc($set);
2473  return (bool) $row['session_count'];
2474  }
Create styles array
The data for the language used.
global $ilDB
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the caller graph for this function:

◆ hasDeletionFlag()

ilObjUser::hasDeletionFlag ( )

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

References getPref().

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

◆ hasPublicProfile()

ilObjUser::hasPublicProfile ( )

returns true if public is profile, false otherwise

Returns
boolean

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

References array, and getPref().

Referenced by getPublicName().

4674  {
4675  return in_array($this->getPref("public_profile"), array("y", "g"));
4676  }
getPref($a_keyword)
get a user preference
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasToAcceptTermsOfService()

ilObjUser::hasToAcceptTermsOfService ( )
Returns
bool

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

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

Referenced by ilSoapUserAdministration\__readUserData().

5336  {
5337  require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
5338 
5339  if (
5341  null == $this->agree_date &&
5342  'root' != $this->login &&
5343  !in_array($this->getId(), array(ANONYMOUS_USER_ID, SYSTEM_USER_ID))
5344  ) {
5345  return true;
5346  }
5347 
5348  return false;
5349  }
getId()
get object id public
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasToAcceptTermsOfServiceInSession()

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

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

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

Referenced by ilTermsOfServiceHelper\trackAcceptance().

5412  {
5413  if (null === $status) {
5414  return ilSession::get('has_to_accept_agr_in_session');
5415  }
5416 
5417  require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
5419  ilSession::set('has_to_accept_agr_in_session', (int) $status);
5420  }
5421  }
static get($a_var)
Get a value.
static set($a_var, $a_val)
Set a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ importPersonalData()

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

Import personal data.

Parameters

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

5243  {
5244  include_once("./Services/Export/classes/class.ilImport.php");
5245  $imp = new ilImport();
5246  if (!$a_profile_data) {
5247  $imp->addSkipEntity("Services/User", "usr_profile");
5248  }
5249  if (!$a_settings) {
5250  $imp->addSkipEntity("Services/User", "usr_setting");
5251  }
5252  if (!$a_bookmarks) {
5253  $imp->addSkipEntity("Services/Bookmarks", "bookmarks");
5254  }
5255  if (!$a_notes) {
5256  $imp->addSkipEntity("Services/Notes", "user_notes");
5257  }
5258  if (!$a_calendar) {
5259  $imp->addSkipEntity("Services/Calendar", "calendar");
5260  }
5261  $imp->importEntity(
5262  $a_file["tmp_name"],
5263  $a_file["name"],
5264  "personal_data",
5265  "Services/User"
5266  );
5267  }
Import class.

◆ initInactivationDate()

static ilObjUser::initInactivationDate (   $usrIds)
staticprivate

type $ilDB

Parameters
type$usrIds

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

References $ilDB.

5275  {
5276  global $ilDB;
5277 
5278  $NOW = $ilDB->now();
5279 
5280  $usrId_IN_usrIds = $ilDB->in('usr_id', $usrIds, false, 'integer');
5281 
5282  $queryString = "
5283  UPDATE usr_data
5284  SET inactivation_date = $NOW
5285  WHERE inactivation_date IS NULL
5286  AND $usrId_IN_usrIds
5287  ";
5288 
5289  $ilDB->manipulate($queryString);
5290  }
global $ilDB

◆ isAnonymous()

ilObjUser::isAnonymous ( )
Returns
bool

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

References ilObject\getId().

Referenced by ilUsersGalleryGUI\addActionSection(), and ilMainMenuGUI\renderOnScreenNotifications().

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

◆ isCaptchaVerified()

ilObjUser::isCaptchaVerified ( )

Is user captcha verified?

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

References $_SESSION.

5155  {
5156  return (boolean) $_SESSION["user_captcha_verified"];
5157  }
$_SESSION["AccountId"]

◆ isCurrentUserActive()

ilObjUser::isCurrentUserActive ( )

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

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

2537  {
2538  global $ilDB,$ilAuth;
2539 
2541  $set = $ilDB->queryF(
2542  "SELECT active FROM usr_data WHERE login= %s",
2543  array("text"),
2544  array($login)
2545  );
2546  //query has got a result
2547  if ($rec = $ilDB->fetchAssoc($set)) {
2548  if ($rec["active"]) {
2549  return true;
2550  }
2551  }
2552 
2553  return false;
2554  }
$login
all user related data in single vars public
static getLoginFromAuth()
Gets the username from $ilAuth, and converts it into an ILIAS login name.
Create styles array
The data for the language used.
global $ilDB
+ 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 3164 of file class.ilObjUser.php.

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

3165  {
3166  return ilObjUser::_isDesktopItem($this->getId(), $a_item_id, $a_type);
3167  }
$a_type
Definition: workflow.php:92
getId()
get object id public
static _isDesktopItem($a_usr_id, $a_item_id, $a_type)
check wether an item is on the users desktop or not
+ Here is the call graph for this function:

◆ isPasswordChangeDemanded()

ilObjUser::isPasswordChangeDemanded ( )
Returns
bool

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

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

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

◆ isPasswordExpired()

ilObjUser::isPasswordExpired ( )

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

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

2324  {
2325  if ($this->id == ANONYMOUS_USER_ID) {
2326  return false;
2327  }
2328 
2329  require_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
2330  $security = ilSecuritySettings::_getInstance();
2331  if ($this->getLastPasswordChangeTS() > 0) {
2332  $max_pass_age = $security->getPasswordMaxAge();
2333  if ($max_pass_age > 0) {
2334  $max_pass_age_ts = ($max_pass_age * 86400);
2335  $pass_change_ts = $this->getLastPasswordChangeTS();
2336  $current_ts = time();
2337 
2338  if (($current_ts - $pass_change_ts) > $max_pass_age_ts) {
2340  return true;
2341  }
2342  }
2343  }
2344  }
2345 
2346  return false;
2347  }
getAuthMode($a_auth_key=false)
get auth mode public
static _needsExternalAccountByAuthMode($a_auth_mode)
Check if chosen auth mode needs an external account entry.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
static _getInstance()
Get instance of ilSecuritySettings.
+ Here is the call graph for this function:

◆ isSelfRegistered()

ilObjUser::isSelfRegistered ( )

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

References $is_self_registered.

5464  {
5465  return (bool) $this->is_self_registered;
5466  }

◆ lookupMatriculation()

static ilObjUser::lookupMatriculation (   $a_usr_id)
static

Lookup matriculation.

Returns
string matricualtion
Parameters
int$a_usr_idpublic

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

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

Referenced by ilObjCourseGrouping\_checkGroupingDependencies().

1831  {
1832  global $ilDB;
1833 
1834  $query = "SELECT matriculation FROM usr_data " .
1835  "WHERE usr_id = " . $ilDB->quote($a_usr_id);
1836  $res = $ilDB->query($query);
1838  return $row->matriculation ? $row->matriculation : '';
1839  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ Here is the caller graph for this function:

◆ lookupOrgUnitsRepresentation()

static ilObjUser::lookupOrgUnitsRepresentation (   $a_usr_id)
static

lokup org unit representation

Parameters
int$a_usr_id
Returns
string

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

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

3535  {
3536  require_once('./Modules/OrgUnit/classes/PathStorage/class.ilOrgUnitPathStorage.php');
3537  return ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($a_usr_id);
3538  }
+ Here is the caller graph for this function:

◆ preloadIsDesktopItem()

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

Preload desktop item information.

Parameters

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

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

Referenced by ilObjectListGUIPreloader\preload().

3131  {
3132  global $ilDB;
3133 
3134  if (!is_array($a_item_ids)) {
3135  return;
3136  }
3137 
3138  $item_ids = array();
3139  foreach ($a_item_ids as $id) {
3140  if (!self::$is_desktop_item_loaded[$a_usr_id . ":" . $id]) {
3141  $item_ids[] = $id;
3142  }
3143  self::$is_desktop_item_loaded[$a_usr_id . ":" . $id] = true;
3144  }
3145 
3146  if (count($item_ids) > 0) {
3147  $item_set = $ilDB->query("SELECT item_id, type FROM desktop_item WHERE " .
3148  $ilDB->in("item_id", $item_ids, false, "integer") .
3149  " AND user_id = " . $ilDB->quote($a_usr_id, "integer"));
3150  while ($r = $ilDB->fetchAssoc($item_set)) {
3151  self::$is_desktop_item_cache[$a_usr_id . ":" . $r["item_id"] . ":" . $r["type"]]
3152  = true;
3153  }
3154  }
3155  }
$r
Definition: example_031.php:79
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ read()

ilObjUser::read ( )

loads a record "user" from database private

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

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

Referenced by __construct(), and assignData().

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

◆ readMultiTextFields()

ilObjUser::readMultiTextFields ( )
protected

Fetch multi-text values from DB.

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

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

Referenced by read().

5581  {
5582  global $ilDB;
5583 
5584  if (!$this->getId()) {
5585  return;
5586  }
5587 
5588  $set = $ilDB->query("SELECT field_id,value" .
5589  " FROM usr_data_multi" .
5590  " WHERE usr_id = " . $ilDB->quote($this->getId(), "integer") .
5591  " ORDER BY value");
5592  while ($row = $ilDB->fetchAssoc($set)) {
5593  $values[$row["field_id"]][] = $row["value"];
5594  }
5595 
5596  if (isset($values["interests_general"])) {
5597  $this->setGeneralInterests($values["interests_general"]);
5598  } else {
5599  $this->setGeneralInterests();
5600  }
5601  if (isset($values["interests_help_offered"])) {
5602  $this->setOfferingHelp($values["interests_help_offered"]);
5603  } else {
5604  $this->setOfferingHelp();
5605  }
5606  if (isset($values["interests_help_looking"])) {
5607  $this->setLookingForHelp($values["interests_help_looking"]);
5608  } else {
5609  $this->setLookingForHelp();
5610  }
5611  }
setOfferingHelp(array $value=null)
Set help offering.
getId()
get object id public
setGeneralInterests(array $value=null)
Set general interests.
setLookingForHelp(array $value=null)
Set help looking for.
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readPrefs()

ilObjUser::readPrefs ( )

get all user preferences private

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

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

Referenced by read().

1213  {
1214  global $ilDB;
1215 
1216  if (is_array($this->prefs)) {
1217  $this->oldPrefs = $this->prefs;
1218  }
1219 
1220  $this->prefs = ilObjUser::_getPreferences($this->id);
1221  }
global $ilDB
static _getPreferences($user_id)
get preferences for user
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readUserDefinedFields()

ilObjUser::readUserDefinedFields ( )

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

References $ilDB, and ilObject\getId().

Referenced by read().

4074  {
4075  global $ilDB;
4076 
4077  include_once("./Services/User/classes/class.ilUserDefinedData.php");
4078  $udata = new ilUserDefinedData($this->getId());
4079 
4080  /* $query = "SELECT * FROM udf_data ".
4081  "WHERE usr_id = ".$ilDB->quote($this->getId(),'integer');
4082 
4083  $res = $this->db->query($query);
4084  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_ASSOC))
4085  {
4086  $this->user_defined_data = $row;
4087  }*/
4088 
4089  $this->user_defined_data = $udata->getAll();
4090 
4091  return true;
4092  }
Class ilUserDefinedData.
getId()
get object id public
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ refreshLogin()

ilObjUser::refreshLogin ( )

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

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

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

824  {
825  global $ilDB;
826 
827  $ilDB->manipulateF(
828  "UPDATE usr_data SET " .
829  "last_login = " . $ilDB->now() .
830  " WHERE usr_id = %s",
831  array("integer"),
832  array($this->id)
833  );
834  }
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:

◆ removeDeletionFlag()

ilObjUser::removeDeletionFlag ( )

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

References writePref().

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

◆ removeObjectFromClipboard()

ilObjUser::removeObjectFromClipboard (   $a_item_id,
  $a_type 
)

remove object from user's personal clipboard

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

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

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

3505  {
3506  global $ilDB;
3507 
3508  $q = "DELETE FROM personal_clipboard WHERE " .
3509  "item_id = " . $ilDB->quote($a_item_id, "integer") .
3510  " AND type = " . $ilDB->quote($a_type, "text") . " " .
3511  " AND user_id = " . $ilDB->quote($this->getId(), "integer");
3512  $ilDB->manipulate($q);
3513  }
$a_type
Definition: workflow.php:92
getId()
get object id public
global $ilDB
+ Here is the call graph for this function:

◆ removeUserPicture()

ilObjUser::removeUserPicture (   $a_do_update = true)

Remove user picture.

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

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

Referenced by delete().

3978  {
3979  $webspace_dir = ilUtil::getWebspaceDir();
3980  $image_dir = $webspace_dir . "/usr_images";
3981  $file = $image_dir . "/usr_" . $this->getID() . "." . "jpg";
3982  $thumb_file = $image_dir . "/usr_" . $this->getID() . "_small.jpg";
3983  $xthumb_file = $image_dir . "/usr_" . $this->getID() . "_xsmall.jpg";
3984  $xxthumb_file = $image_dir . "/usr_" . $this->getID() . "_xxsmall.jpg";
3985  $upload_file = $image_dir . "/upload_" . $this->getID();
3986 
3987  if ($a_do_update) {
3988  // remove user pref file name
3989  $this->setPref("profile_image", "");
3990  $this->update();
3991  }
3992 
3993  if (@is_file($file)) {
3994  unlink($file);
3995  }
3996  if (@is_file($thumb_file)) {
3997  unlink($thumb_file);
3998  }
3999  if (@is_file($xthumb_file)) {
4000  unlink($xthumb_file);
4001  }
4002  if (@is_file($xxthumb_file)) {
4003  unlink($xxthumb_file);
4004  }
4005  if (@is_file($upload_file)) {
4006  unlink($upload_file);
4007  }
4008  }
setPref($a_keyword, $a_value)
set a user preference
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
update()
update object in db
static getWebspaceDir($mode="filesystem")
get webspace directory
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetInactivationDate()

static ilObjUser::resetInactivationDate (   $usrIds)
staticprivate

type $ilDB

Parameters
type$usrIds

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

References $ilDB.

5298  {
5299  global $ilDB;
5300 
5301  $usrId_IN_usrIds = $ilDB->in('usr_id', $usrIds, false, 'integer');
5302 
5303  $queryString = "
5304  UPDATE usr_data
5305  SET inactivation_date = NULL
5306  WHERE $usrId_IN_usrIds
5307  ";
5308 
5309  $ilDB->manipulate($queryString);
5310  }
global $ilDB

◆ resetLastPasswordChange()

ilObjUser::resetLastPasswordChange ( )

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

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

2378  {
2379  global $ilDB;
2380 
2381  $query = "UPDATE usr_data SET last_password_change = 0 " .
2382  "WHERE usr_id = %s";
2383  $affected = $ilDB->manipulateF(
2384  $query,
2385  array('integer'),
2386  array($this->getId())
2387  );
2388  if ($affected) {
2389  return true;
2390  } else {
2391  return false;
2392  }
2393  }
getId()
get object id public
$query
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:

◆ resetOwner()

ilObjUser::resetOwner ( )

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

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

Referenced by delete().

5103  {
5104  global $ilDB;
5105 
5106  $query = "UPDATE object_data SET owner = 0 " .
5107  "WHERE owner = " . $ilDB->quote($this->getId(), 'integer');
5108  $ilDB->query($query);
5109 
5110  return true;
5111  }
getId()
get object id public
$query
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ searchUsers()

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

STATIC METHOD get the user_ids which correspond a search string.

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

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

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

Referenced by ilObjUserTest\testSearch().

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

◆ sendPersonalDataFile()

ilObjUser::sendPersonalDataFile ( )

Send personal data file.

Parameters

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

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

5221  {
5222  include_once("./Services/Export/classes/class.ilExport.php");
5223  $file = ilExport::_getExportDirectory($this->getId(), "xml", "usr", "personal_data") .
5224  "/" . $this->getPersonalDataExportFile();
5225  if (is_file($file)) {
5227  }
5228  }
getId()
get object id public
getPersonalDataExportFile()
Get personal data export file.
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
+ Here is the call graph for this function:

◆ setActive()

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

set user active state and updates system fields appropriately public

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

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

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

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

2126  {
2127  $this->setOwner($a_owner);
2128 
2129  if ($a_active) {
2130  $this->active = 1;
2131  $this->setApproveDate(date('Y-m-d H:i:s'));
2132  $this->setOwner($a_owner);
2133  } else {
2134  $this->active = 0;
2135  $this->setApproveDate(null);
2136  }
2137  }
setOwner($a_owner)
set object owner
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
setApproveDate($a_str)
set date the user account was activated null indicates that the user has not yet been activated publ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAgreeDate()

ilObjUser::setAgreeDate (   $a_str)

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

Returns
void

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

2114  {
2115  $this->agree_date = $a_str;
2116  }

◆ setApproveDate()

ilObjUser::setApproveDate (   $a_str)

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

Returns
void

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

Referenced by setActive().

2083  {
2084  $this->approve_date = $a_str;
2085  }
+ Here is the caller graph for this function:

◆ setAuthMode()

ilObjUser::setAuthMode (   $a_str)

set auth mode public

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

Referenced by assignData().

3555  {
3556  $this->auth_mode = $a_str;
3557  }
+ Here is the caller graph for this function:

◆ setBirthday()

ilObjUser::setBirthday (   $a_birthday)

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

References IL_CAL_DATE.

Referenced by assignData().

4995  {
4996  if (strlen($a_birthday)) {
4997  $date = new ilDate($a_birthday, IL_CAL_DATE);
4998  $this->birthday = $date->get(IL_CAL_DATE);
4999  } else {
5000  $this->birthday = null;
5001  }
5002  }
Class for single dates.
const IL_CAL_DATE
+ Here is the caller graph for this function:

◆ setCaptchaVerified()

ilObjUser::setCaptchaVerified (   $a_val)

Set captcha verified.

Parameters

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

References $_SESSION.

5165  {
5166  $_SESSION["user_captcha_verified"] = $a_val;
5167  }
$_SESSION["AccountId"]

◆ setCity()

ilObjUser::setCity (   $a_str)

set city public

Parameters
stringcity

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

Referenced by assignData().

1637  {
1638  $this->city = $a_str;
1639  }
+ Here is the caller graph for this function:

◆ setClientIP()

ilObjUser::setClientIP (   $a_str)

set client ip number public

Parameters
stringclient ip

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

Referenced by assignData().

1792  {
1793  $this->client_ip = $a_str;
1794  }
+ Here is the caller graph for this function:

◆ setComment()

ilObjUser::setComment (   $a_str)

set referral comment public

Parameters
stringhobby

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

Referenced by assignData().

2063  {
2064  $this->referral_comment = $a_str;
2065  }
+ Here is the caller graph for this function:

◆ setCountry()

ilObjUser::setCountry (   $a_str)

Set country (free text)

public

Parameters
stringcountry

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

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

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

◆ setCurrentLanguage()

ilObjUser::setCurrentLanguage (   $a_val)

Set current language.

Parameters
string$a_valcurrent language

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

References $_SESSION.

2019  {
2020  $_SESSION['lang'] = $a_val;
2021  }
$_SESSION["AccountId"]

◆ setDepartment()

ilObjUser::setDepartment (   $a_str)

set department public

Parameters
stringdepartment

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

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

1599  {
1600  $this->department = $a_str;
1601  }
+ 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 3012 of file class.ilObjUser.php.

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

3013  {
3014  global $ilDB;
3015 
3016  $ilDB->manipulateF(
3017  "UPDATE desktop_item SET parameters = %s " .
3018  " WHERE item_id = %s AND type = %s AND user_id = %s",
3019  array("text", "integer", "text", "integer"),
3020  array($a_par, $a_item_id, $a_type, $this->getId())
3021  );
3022  }
$a_type
Definition: workflow.php:92
getId()
get object id public
Create styles array
The data for the language used.
global $ilDB
+ 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.

public

Parameters
integer

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

References setPref().

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

◆ setEmail()

ilObjUser::setEmail (   $a_str)

set email public

Parameters
stringemail address

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

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

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

◆ setExternalAccount()

ilObjUser::setExternalAccount (   $a_str)

set external account

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

public

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

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

3581  {
3582  $this->ext_account = $a_str;
3583  }
+ Here is the caller graph for this function:

◆ setFax()

ilObjUser::setFax (   $a_str)

set fax public

Parameters
stringfax

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

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

1773  {
1774  $this->fax = $a_str;
1775  }
+ Here is the caller graph for this function:

◆ setFirstname()

ilObjUser::setFirstname (   $a_str)

set firstname public

Parameters
stringfirstname

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

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

1542  {
1543  $this->firstname = $a_str;
1544  }
+ Here is the caller graph for this function:

◆ setFullname()

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

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

But you may use the function in static manner. static

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

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

References $fullname, and $lastname.

Referenced by assignData().

1381  {
1382  $this->fullname = "";
1383 
1384  if ($a_title) {
1385  $fullname = $a_title . " ";
1386  } elseif ($this->utitle) {
1387  $this->fullname = $this->utitle . " ";
1388  }
1389 
1390  if ($a_firstname) {
1391  $fullname .= $a_firstname . " ";
1392  } elseif ($this->firstname) {
1393  $this->fullname .= $this->firstname . " ";
1394  }
1395 
1396  if ($a_lastname) {
1397  return $fullname . $a_lastname;
1398  }
1399 
1400  $this->fullname .= $this->lastname;
1401  }
+ Here is the caller graph for this function:

◆ setGender()

ilObjUser::setGender (   $a_str)

set gender public

Parameters
stringgender

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

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

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

◆ setGeneralInterests()

ilObjUser::setGeneralInterests ( array  $value = null)

Set general interests.

Parameters
array$value

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

Referenced by readMultiTextFields().

5479  {
5480  $this->interests_general = $value;
5481  }
+ Here is the caller graph for this function:

◆ setHobby()

ilObjUser::setHobby (   $a_str)

set hobby public

Parameters
stringhobby

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

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

1882  {
1883  $this->hobby = $a_str;
1884  }
+ Here is the caller graph for this function:

◆ setInactivationDate()

ilObjUser::setInactivationDate (   $inactivation_date)

setter for inactivation date

Parameters
string$inactivationDate

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

References $inactivation_date.

Referenced by assignData().

5318  {
5319  $this->inactivation_date = $inactivation_date;
5320  }
+ Here is the caller graph for this function:

◆ setInstitution()

ilObjUser::setInstitution (   $a_str)

set institution public

Parameters
stringinstitution

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

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

1580  {
1581  $this->institution = $a_str;
1582  }
+ Here is the caller graph for this function:

◆ setIsSelfRegistered()

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

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

Referenced by assignData().

5459  {
5460  $this->is_self_registered = (bool) $status;
5461  }
+ Here is the caller graph for this function:

◆ setLanguage()

ilObjUser::setLanguage (   $a_str)

set user language public

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

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

References $_SESSION, and setPref().

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

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

◆ setLastLogin()

ilObjUser::setLastLogin (   $a_str)

set user's last login public

Parameters
stringlogin date

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

Referenced by assignData().

2029  {
2030  $this->last_login = $a_str;
2031  }
+ Here is the caller graph for this function:

◆ setLastname()

ilObjUser::setLastname (   $a_str)

set lastame public

Parameters
stringlastname

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

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

1561  {
1562  $this->lastname = $a_str;
1563  }
+ Here is the caller graph for this function:

◆ setLastPasswordChangeToNow()

ilObjUser::setLastPasswordChangeToNow ( )

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

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

2358  {
2359  global $ilDB;
2360 
2361  $this->setLastPasswordChangeTS(time());
2362 
2363  $query = "UPDATE usr_data SET last_password_change = %s " .
2364  "WHERE usr_id = %s";
2365  $affected = $ilDB->manipulateF(
2366  $query,
2367  array('integer','integer'),
2368  array($this->getLastPasswordChangeTS(),$this->id)
2369  );
2370  if ($affected) {
2371  return true;
2372  } else {
2373  return false;
2374  }
2375  }
$query
Create styles array
The data for the language used.
setLastPasswordChangeTS($a_last_password_change_ts)
global $ilDB
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ 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.

Referenced by read(), and setLastPasswordChangeToNow().

1949  {
1950  $this->last_password_change_ts = $a_last_password_change_ts;
1951  }
+ Here is the caller graph for this function:

◆ setLastUpdate()

ilObjUser::setLastUpdate (   $a_str)

set last update of user data set public

Parameters
stringdate

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

Referenced by assignData().

2049  {
2050  $this->last_update = $a_str;
2051  }
+ Here is the caller graph for this function:

◆ setLatitude()

ilObjUser::setLatitude (   $a_latitude)

Set Latitude.

Parameters
string$a_latitudeLatitude

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

Referenced by assignData().

2401  {
2402  $this->latitude = $a_latitude;
2403  }
+ Here is the caller graph for this function:

◆ setLocationZoom()

ilObjUser::setLocationZoom (   $a_locationzoom)

Set Location Zoom.

Parameters
int$a_locationzoomLocation Zoom

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

Referenced by assignData().

2441  {
2442  $this->loc_zoom = $a_locationzoom;
2443  }
+ Here is the caller graph for this function:

◆ setLogin()

ilObjUser::setLogin (   $a_str)

set login / username public

Parameters
stringusername

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

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

1448  {
1449  $this->login = $a_str;
1450  }
+ Here is the caller graph for this function:

◆ setLoginAttempts()

ilObjUser::setLoginAttempts (   $a_login_attempts)

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

Referenced by read().

2255  {
2256  $this->login_attempts = $a_login_attempts;
2257  }
+ Here is the caller graph for this function:

◆ setLongitude()

ilObjUser::setLongitude (   $a_longitude)

Set Longitude.

Parameters
string$a_longitudeLongitude

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

Referenced by assignData().

2421  {
2422  $this->longitude = $a_longitude;
2423  }
+ Here is the caller graph for this function:

◆ setLookingForHelp()

ilObjUser::setLookingForHelp ( array  $value = null)

Set help looking for.

Parameters
array$value

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

Referenced by readMultiTextFields().

5539  {
5540  $this->interests_help_looking = $value;
5541  }
+ Here is the caller graph for this function:

◆ setMatriculation()

ilObjUser::setMatriculation (   $a_str)

set matriculation number public

Parameters
stringmatriculation number

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

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

1811  {
1812  $this->matriculation = $a_str;
1813  }
+ Here is the caller graph for this function:

◆ setOfferingHelp()

ilObjUser::setOfferingHelp ( array  $value = null)

Set help offering.

Parameters
array$value

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

Referenced by readMultiTextFields().

5509  {
5510  $this->interests_help_offered = $value;
5511  }
+ Here is the caller graph for this function:

◆ setPasswd()

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

set password public

Parameters
stringpasswd

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

References $a_type.

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

1467  {
1468  $this->passwd = $a_str;
1469  $this->passwd_type = $a_type;
1470  }
$a_type
Definition: workflow.php:92
+ Here is the caller graph for this function:

◆ setPasswordEncodingType()

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

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

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

297  {
298  $this->password_encoding_type = $password_encryption_type;
299  }
+ Here is the caller graph for this function:

◆ setPasswordSalt()

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

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

References $password_salt.

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

313  {
314  $this->password_salt = $password_salt;
315  }
+ Here is the caller graph for this function:

◆ setPhoneHome()

ilObjUser::setPhoneHome (   $a_str)

set home phone public

Parameters
stringhome phone

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

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

1735  {
1736  $this->phone_home = $a_str;
1737  }
+ Here is the caller graph for this function:

◆ setPhoneMobile()

ilObjUser::setPhoneMobile (   $a_str)

set mobile phone public

Parameters
stringmobile phone

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

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

1754  {
1755  $this->phone_mobile = $a_str;
1756  }
+ Here is the caller graph for this function:

◆ setPhoneOffice()

ilObjUser::setPhoneOffice (   $a_str)

set office phone public

Parameters
stringoffice phone

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

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

1716  {
1717  $this->phone_office = $a_str;
1718  }
+ Here is the caller graph for this function:

◆ setPref()

ilObjUser::setPref (   $a_keyword,
  $a_value 
)

set a user preference

Parameters
stringname of parameter
stringvalue public

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

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

1174  {
1175  if ($a_keyword != "") {
1176  $this->prefs[$a_keyword] = $a_value;
1177  }
1178  }
+ Here is the caller graph for this function:

◆ setProfileIncomplete()

ilObjUser::setProfileIncomplete (   $a_prof_inc)

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

Referenced by assignData().

2276  {
2277  $this->profile_incomplete = (boolean) $a_prof_inc;
2278  }
+ Here is the caller graph for this function:

◆ setSecondEmail()

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

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

References $second_email.

Referenced by assignData().

1872  {
1873  $this->second_email = $second_email;
1874  }
+ 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 1695 of file class.ilObjUser.php.

Referenced by assignData().

1696  {
1697  $this->sel_country = $a_val;
1698  }
+ Here is the caller graph for this function:

◆ setSkin()

ilObjUser::setSkin (   $a_str)

set user skin (template set) public

Parameters
stringdirectory name of template set

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

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

◆ setStreet()

ilObjUser::setStreet (   $a_str)

set street public

Parameters
stringstreet

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

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

1618  {
1619  $this->street = $a_str;
1620  }
+ Here is the caller graph for this function:

◆ setTimeLimitFrom()

ilObjUser::setTimeLimitFrom (   $a_from)

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

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

2222  {
2223  $this->time_limit_from = $a_from;
2224  }
+ Here is the caller graph for this function:

◆ setTimeLimitMessage()

ilObjUser::setTimeLimitMessage (   $a_time_limit_message)

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

Referenced by assignData().

2246  {
2247  return $this->time_limit_message = $a_time_limit_message;
2248  }
+ Here is the caller graph for this function:

◆ setTimeLimitOwner()

ilObjUser::setTimeLimitOwner (   $a_owner)

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

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

2214  {
2215  $this->time_limit_owner = $a_owner;
2216  }
+ Here is the caller graph for this function:

◆ setTimeLimitUnlimited()

ilObjUser::setTimeLimitUnlimited (   $a_unlimited)

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

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

2238  {
2239  $this->time_limit_unlimited = $a_unlimited;
2240  }
+ Here is the caller graph for this function:

◆ setTimeLimitUntil()

ilObjUser::setTimeLimitUntil (   $a_until)

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

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

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

◆ setUserDefinedData()

ilObjUser::setUserDefinedData (   $a_data)

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

References $data.

4012  {
4013  if (!is_array($a_data)) {
4014  return false;
4015  }
4016  foreach ($a_data as $field => $data) {
4017  #$new_data[$field] = ilUtil::stripSlashes($data);
4018  // Assign it directly to avoid update problems of unchangable fields
4019  $this->user_defined_data['f_' . $field] = $data;
4020  }
4021  #$this->user_defined_data = $new_data;
4022 
4023  return true;
4024  }

◆ setUTitle()

ilObjUser::setUTitle (   $a_str)

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

Parameters
stringtitle

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

Referenced by assignData().

1521  {
1522  $this->utitle = $a_str;
1523  }
+ Here is the caller graph for this function:

◆ setZipcode()

ilObjUser::setZipcode (   $a_str)

set zipcode public

Parameters
stringzipcode

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

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

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

◆ syncActive()

ilObjUser::syncActive ( )

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

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

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

Referenced by assignData().

2171  {
2172  global $ilAuth;
2173 
2174  $storedActive = 0;
2175  if ($this->getStoredActive($this->id)) {
2176  $storedActive = 1;
2177  }
2178 
2179  $currentActive = 0;
2180  if ($this->active) {
2181  $currentActive = 1;
2182  }
2183 
2184  if ((!empty($storedActive) && empty($currentActive)) ||
2185  (empty($storedActive) && !empty($currentActive))) {
2186  $this->setActive($currentActive, self::getUserIdByLogin(ilObjUser::getLoginFromAuth()));
2187  }
2188  }
setActive($a_active, $a_owner=0)
set user active state and updates system fields appropriately public
static getLoginFromAuth()
Gets the username from $ilAuth, and converts it into an ILIAS login name.
getStoredActive($a_id)
get user active state
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toUsernameWithoutDomain()

static ilObjUser::toUsernameWithoutDomain (   $a_login)
static

Static function removes Microsoft domain name from username webdav related.

Parameters
string$a_login
Returns
string

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

2517  {
2518  // Remove all characters including the last slash or the last backslash
2519  // in the username
2520  $pos = strrpos($a_login, '/');
2521  $pos2 = strrpos($a_login, '\\');
2522  if ($pos === false || $pos < $pos2) {
2523  $pos = $pos2;
2524  }
2525  if ($pos !== false) {
2526  $a_login = substr($a_login, $pos + 1);
2527  }
2528  return $a_login;
2529  }

◆ updateLogin()

ilObjUser::updateLogin (   $a_login)

update login name

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

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

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

944  {
945  global $ilDB, $ilSetting;
946 
947  if (func_num_args() != 1) {
948  return false;
949  }
950 
951  if (!isset($a_login)) {
952  return false;
953  }
954 
955  $former_login = self::_lookupLogin($this->getId());
956 
957  // Update not necessary
958  if (0 == strcmp($a_login, $former_login)) {
959  return false;
960  }
961 
962  try {
963  $last_history_entry = ilObjUser::_getLastHistoryDataByUserId($this->getId());
964  } catch (ilUserException $e) {
965  $last_history_entry = null;
966  }
967 
968  // throw exception if the desired loginame is already in history and it is not allowed to reuse it
969  if ((int) $ilSetting->get('allow_change_loginname') &&
970  (int) $ilSetting->get('reuse_of_loginnames') == 0 &&
971  self::_doesLoginnameExistInHistory($a_login)) {
972  throw new ilUserException($this->lng->txt('loginname_already_exists'));
973  } elseif ((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  include_once 'Services/Calendar/classes/class.ilDate.php';
978  throw new ilUserException(
979  sprintf(
980  $this->lng->txt('changing_loginname_not_possible_info'),
982  new ilDateTime($last_history_entry[1], IL_CAL_UNIX)
983  ),
985  new ilDateTime(($last_history_entry[1] + (int) $ilSetting->get('loginname_change_blocking_time')), IL_CAL_UNIX)
986  )
987  )
988  );
989  } else {
990  // log old loginname in history
991  if ((int) $ilSetting->get('allow_change_loginname') &&
992  (int) $ilSetting->get('create_history_loginname')) {
993  ilObjUser::_writeHistory($this->getId(), $former_login);
994  }
995 
996  //update login
997  $this->login = $a_login;
998 
999  $ilDB->manipulateF(
1000  '
1001  UPDATE usr_data
1002  SET login = %s
1003  WHERE usr_id = %s',
1004  array('text', 'integer'),
1005  array($this->getLogin(), $this->getId())
1006  );
1007  }
1008 
1009  return true;
1010  }
Class for user related exception handling in ILIAS.
getLogin()
get login / username public
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
static _getLastHistoryDataByUserId($a_usr_id)
Returns the last used loginname and the changedate of the passed user_id.
const IL_CAL_UNIX
getId()
get object id public
Date and time handling
Create styles array
The data for the language used.
global $ilSetting
Definition: privfeed.php:17
global $ilDB
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
static _writeHistory($a_usr_id, $a_login)
+ Here is the call graph for this function:

◆ updateMultiTextFields()

ilObjUser::updateMultiTextFields (   $a_create = false)

Write multi-text values to DB.

Parameters
bool$a_create

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

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

Referenced by assignData().

5619  {
5620  global $ilDB;
5621 
5622  if (!$this->getId()) {
5623  return;
5624  }
5625 
5626  if (!$a_create) {
5627  $this->deleteMultiTextFields();
5628  }
5629 
5630  $map = array(
5631  "interests_general" => $this->getGeneralInterests(),
5632  "interests_help_offered" => $this->getOfferingHelp(),
5633  "interests_help_looking" => $this->getLookingForHelp()
5634  );
5635 
5636  foreach ($map as $id => $values) {
5637  if (is_array($values) && sizeof($values)) {
5638  foreach ($values as $value) {
5639  $value = trim($value);
5640  if ($value) {
5641  $uniq_id = $ilDB->nextId('usr_data_multi');
5642 
5643  $ilDB->manipulate("INSERT usr_data_multi" .
5644  " (id,usr_id,field_id,value) VALUES" .
5645  " (" . $ilDB->quote($uniq_id, "integer") .
5646  "," . $ilDB->quote($this->getId(), "integer") .
5647  "," . $ilDB->quote($id, "text") .
5648  "," . $ilDB->quote($value, "text") .
5649  ")");
5650  }
5651  }
5652  }
5653  }
5654  }
getLookingForHelp()
Get help looking for.
getGeneralInterests()
Get general interests.
getId()
get object id public
getOfferingHelp()
Get help offering.
Create styles array
The data for the language used.
deleteMultiTextFields()
Remove multi-text values from DB.
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateUserDefinedFields()

ilObjUser::updateUserDefinedFields ( )

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

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

Referenced by assignData().

4032  {
4033  global $ilDB;
4034 
4035  $fields = '';
4036 
4037  $field_def = array();
4038 
4039  include_once("./Services/User/classes/class.ilUserDefinedData.php");
4040  $udata = new ilUserDefinedData($this->getId());
4041 
4042  foreach ($this->user_defined_data as $field => $value) {
4043  if ($field != 'usr_id') {
4044  // $field_def[$field] = array('text',$value);
4045  $udata->set($field, $value);
4046  }
4047  }
4048  $udata->update();
4049 
4050  /* if(!$field_def)
4051  {
4052  return true;
4053  }
4054 
4055  $query = "SELECT usr_id FROM udf_data WHERE usr_id = ".$ilDB->quote($this->getId(),'integer');
4056  $res = $ilDB->query($query);
4057 
4058 
4059  if($res->numRows())
4060  {
4061  // Update
4062  $ilDB->update('udf_data',$field_def,array('usr_id' => array('integer',$this->getId())));
4063  }
4064  else
4065  {
4066  $field_def['usr_id'] = array('integer',$this->getId());
4067  $ilDB->insert('udf_data',$field_def);
4068  }
4069  */
4070  return true;
4071  }
Class ilUserDefinedData.
getId()
get object id public
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ userExists()

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

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

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

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

5139  {
5140  global $ilDB;
5141 
5142  $query = 'SELECT count(*) num FROM object_data od ' .
5143  'JOIN usr_data ud ON obj_id = usr_id ' .
5144  'WHERE ' . $ilDB->in('obj_id', $a_usr_ids, false, 'integer') . ' ';
5145  $res = $ilDB->query($query);
5146  $num_rows =$res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)->num;
5147  return $num_rows == count((array) $a_usr_ids);
5148  }
foreach($_POST as $key=> $value) $res
$query
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ writeAccepted()

ilObjUser::writeAccepted ( )

write accept date of user agreement to db

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

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

Referenced by ilTermsOfServiceHelper\trackAcceptance().

636  {
637  global $ilDB;
638 
639  $ilDB->manipulateF("UPDATE usr_data SET agree_date = " . $ilDB->now() .
640  " WHERE usr_id = %s", array("integer"), array($this->getId()));
641  }
getId()
get object id public
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writePref()

ilObjUser::writePref (   $a_keyword,
  $a_value 
)

write userpref to user table private

Parameters
stringkeyword
stringvalue

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

References setPref().

Referenced by activateDeletionFlag(), and removeDeletionFlag().

1019  {
1020  self::_writePref($this->id, $a_keyword, $a_value);
1021  $this->setPref($a_keyword, $a_value);
1022  }
setPref($a_keyword, $a_value)
set a user preference
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writePrefs()

ilObjUser::writePrefs ( )

write all userprefs private

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

References $ilDB, and _deleteAllPref().

Referenced by assignData().

1107  {
1108  global $ilDB;
1109 
1110  ilObjUser::_deleteAllPref($this->id);
1111  foreach ($this->prefs as $keyword => $value) {
1112  self::_writePref($this->id, $keyword, $value);
1113  }
1114  }
global $ilDB
static _deleteAllPref($a_user_id)
Deletes a userpref value of the user from the database public.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $active

◆ $agree_date

ilObjUser::$agree_date = null

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

Referenced by getAgreeDate().

◆ $approve_date

ilObjUser::$approve_date = null

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

Referenced by getApproveDate().

◆ $auth_mode

ilObjUser::$auth_mode

Definition at line 99 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 98 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 130 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(), and getPersonalPicturePath().

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

Referenced by getHobby().

◆ $ilias

ilObjUser::$ilias

◆ $inactivation_date

ilObjUser::$inactivation_date = null
protected

Definition at line 152 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 166 of file class.ilObjUser.php.

Referenced by getGeneralInterests().

◆ $interests_help_looking

ilObjUser::$interests_help_looking
protected

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

Referenced by getLookingForHelp().

◆ $interests_help_offered

ilObjUser::$interests_help_offered
protected

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

Referenced by getOfferingHelp().

◆ $is_desktop_item_cache

ilObjUser::$is_desktop_item_cache
static

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

◆ $is_desktop_item_loaded

ilObjUser::$is_desktop_item_loaded
static

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

◆ $is_self_registered

ilObjUser::$is_self_registered = false
private

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

Referenced by isSelfRegistered().

◆ $last_password_change_ts

ilObjUser::$last_password_change_ts

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

Referenced by getLastPasswordChangeTS().

◆ $lastname

ilObjUser::$lastname

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

Referenced by getLastname(), getPersonalPicturePath(), and setFullname().

◆ $latitude

ilObjUser::$latitude

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

Referenced by getLatitude().

◆ $loc_zoom

ilObjUser::$loc_zoom

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

Referenced by getLocationZoom().

◆ $login

ilObjUser::$login

◆ $login_attempts

ilObjUser::$login_attempts

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

Referenced by _getLoginAttempts(), and getLoginAttempts().

◆ $longitude

ilObjUser::$longitude

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

Referenced by getLongitude().

◆ $matriculation

ilObjUser::$matriculation

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

Referenced by getMatriculation().

◆ $org_units

ilObjUser::$org_units
protected

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

◆ $passwd

ilObjUser::$passwd
protected

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

Referenced by assignData(), and 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 145 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 115 of file class.ilObjUser.php.

Referenced by _getPreferences(), and readPrefs().

◆ $referral_comment

ilObjUser::$referral_comment

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

Referenced by getComment().

◆ $second_email

ilObjUser::$second_email = null
protected

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

Referenced by getSecondEmail(), and setSecondEmail().

◆ $sel_country

ilObjUser::$sel_country

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

Referenced by getSelectedCountry().

◆ $skin

ilObjUser::$skin

Definition at line 122 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 108 of file class.ilObjUser.php.

Referenced by deleteUserDefinedFieldEntries().

◆ $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: