ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilObjUser Class Reference
+ Inheritance diagram for ilObjUser:
+ Collaboration diagram for ilObjUser:

Public Member Functions

 __construct ($a_user_id=0, $a_call_by_reference=false)
 Constructor @access public. More...
 
 read ()
 loads a record "user" from database @access private More...
 
 getPasswordEncodingType ()
 
 setPasswordEncodingType ($password_encryption_type)
 
 getPasswordSalt ()
 
 setPasswordSalt ($password_salt)
 
 assignData ($a_data)
 loads a record "user" from array @access public More...
 
 writeAccepted ()
 write accept date of user agreement to db More...
 
 _lookupFullname ($a_user_id)
 Lookup Full Name. More...
 
 _lookupIm ($a_user_id, $a_type)
 Lookup IM. More...
 
 _lookupEmail ($a_user_id)
 Lookup email. More...
 
 _lookupClientIP ($a_user_id)
 Lookup client ip. More...
 
 _lookupFields ($a_user_id)
 lookup fields (deprecated; use more specific methods instead) More...
 
 _lookupLogin ($a_user_id)
 lookup login More...
 
 _lookupExternalAccount ($a_user_id)
 lookup external account for login and authmethod More...
 
 _lookupLastLogin ($a_user_id)
 lookup last login More...
 
 refreshLogin ()
 updates the login data of a "user" // TODO set date with now() should be enough @access public More...
 
 updateLogin ($a_login)
 update login name More...
 
 writePref ($a_keyword, $a_value)
 write userpref to user table @access private More...
 
 deletePref ($a_keyword)
 Deletes a userpref value of the user from the database @access public. More...
 
 _deleteAllPref ($a_user_id)
 Deletes a userpref value of the user from the database @access public. More...
 
 writePrefs ()
 write all userprefs @access private More...
 
 getTimeZone ()
 get timezone of user More...
 
 getTimeFormat ()
 get time format More...
 
 getDateFormat ()
 get date format More...
 
 setPref ($a_keyword, $a_value)
 set a user preference More...
 
 getPref ($a_keyword)
 get a user preference More...
 
 _lookupPref ($a_usr_id, $a_keyword)
 
 readPrefs ()
 get all user preferences @access private More...
 
 delete ()
 deletes a user @access public More...
 
 setFullname ($a_title="", $a_firstname="", $a_lastname="")
 builds a string with title + firstname + lastname method is used to build fullname in member variable $this->fullname. More...
 
 getFullname ($a_max_strlen=0)
 get fullname @access public More...
 
 setLogin ($a_str)
 set login / username @access public More...
 
 getLogin ()
 get login / username @access public More...
 
 setPasswd ($a_str, $a_type=IL_PASSWD_PLAIN)
 set password @access public More...
 
 getPasswd ()
 get password More...
 
 getPasswdType ()
 get password type More...
 
 setGender ($a_str)
 set gender @access public More...
 
 getGender ()
 get gender @access public More...
 
 setUTitle ($a_str)
 set user title (note: don't mix up this method with setTitle() that is derived from ilObject and sets the user object's title) @access public More...
 
 getUTitle ()
 get user title (note: don't mix up this method with getTitle() that is derived from ilObject and gets the user object's title) @access public More...
 
 setFirstname ($a_str)
 set firstname @access public More...
 
 getFirstname ()
 get firstname @access public More...
 
 setLastname ($a_str)
 set lastame @access public More...
 
 getLastname ()
 get lastname @access public More...
 
 setInstitution ($a_str)
 set institution @access public More...
 
 getInstitution ()
 get institution @access public More...
 
 setDepartment ($a_str)
 set department @access public More...
 
 getDepartment ()
 get department @access public More...
 
 setStreet ($a_str)
 set street @access public More...
 
 getStreet ()
 get street @access public More...
 
 setCity ($a_str)
 set city @access public More...
 
 getCity ()
 get city @access public More...
 
 setZipcode ($a_str)
 set zipcode @access public More...
 
 getZipcode ()
 get zipcode @access public More...
 
 setCountry ($a_str)
 Set country (free text) More...
 
 getCountry ()
 Get country (free text) More...
 
 setSelectedCountry ($a_val)
 Set selected country (selection drop down) More...
 
 getSelectedCountry ()
 Get selected country (selection drop down) More...
 
 setPhoneOffice ($a_str)
 set office phone @access public More...
 
 getPhoneOffice ()
 get office phone @access public More...
 
 setPhoneHome ($a_str)
 set home phone @access public More...
 
 getPhoneHome ()
 get home phone @access public More...
 
 setPhoneMobile ($a_str)
 set mobile phone @access public More...
 
 getPhoneMobile ()
 get mobile phone @access public More...
 
 setFax ($a_str)
 set fax @access public More...
 
 getFax ()
 get fax @access public More...
 
 setClientIP ($a_str)
 set client ip number @access public More...
 
 getClientIP ()
 get client ip number @access public More...
 
 setMatriculation ($a_str)
 set matriculation number @access public More...
 
 getMatriculation ()
 get matriculation number @access public More...
 
 setEmail ($a_str)
 set email @access public More...
 
 getEmail ()
 get email address @access public More...
 
 setHobby ($a_str)
 
 getHobby ()
 get hobby @access public More...
 
 setLanguage ($a_str)
 set user language @access public More...
 
 getLanguage ()
 returns a 2char-language-string @access public More...
 
 setDiskQuota ($a_disk_quota)
 
 getDiskQuota ()
 
 getPersonalWorkspaceDiskQuota ()
 
 setLastPasswordChangeTS ($a_last_password_change_ts)
 
 getLastPasswordChangeTS ()
 
 _writeExternalAccount ($a_usr_id, $a_ext_id)
 
 _writeAuthMode ($a_usr_id, $a_auth_mode)
 
 getCurrentLanguage ()
 returns the current language (may differ from user's pref setting!) More...
 
 setCurrentLanguage ($a_val)
 Set current language. More...
 
 setLastLogin ($a_str)
 set user's last login @access public More...
 
 getLastLogin ()
 returns last login date @access public More...
 
 setLastUpdate ($a_str)
 set last update of user data set @access public More...
 
 getLastUpdate ()
 
 setComment ($a_str)
 set referral comment @access public More...
 
 getComment ()
 get referral comment @access public More...
 
 setApproveDate ($a_str)
 set date the user account was activated null indicates that the user has not yet been activated @access public More...
 
 getApproveDate ()
 get the date when the user account was approved @access public More...
 
 getAgreeDate ()
 get the date when the user accepted the user agreement @access public More...
 
 setAgreeDate ($a_str)
 set date the user account was accepted by the user nullindicates that the user has not accepted his account @access public More...
 
 setActive ($a_active, $a_owner=0)
 set user active state and updates system fields appropriately @access public More...
 
 getActive ()
 get user active state @access public More...
 
 _lookupActive ($a_usr_id)
 Check user account active. More...
 
 syncActive ()
 synchronizes current and stored user active values for the owner value to be set correctly, this function should only be called when an admin is approving a user account @access public More...
 
 getStoredActive ($a_id)
 get user active state More...
 
 setSkin ($a_str)
 set user skin (template set) @access public More...
 
 setTimeLimitOwner ($a_owner)
 
 getTimeLimitOwner ()
 
 setTimeLimitFrom ($a_from)
 
 getTimeLimitFrom ()
 
 setTimeLimitUntil ($a_until)
 
 getTimeLimitUntil ()
 
 setTimeLimitUnlimited ($a_unlimited)
 
 getTimeLimitUnlimited ()
 
 setTimeLimitMessage ($a_time_limit_message)
 
 getTimeLimitMessage ()
 
 setLoginAttempts ($a_login_attempts)
 
 getLoginAttempts ()
 
 checkTimeLimit ()
 
 setProfileIncomplete ($a_prof_inc)
 
 getProfileIncomplete ()
 
 isPasswordChangeDemanded ()
 
 isPasswordExpired ()
 
 getPasswordAge ()
 
 setLastPasswordChangeToNow ()
 
 resetLastPasswordChange ()
 
 setLatitude ($a_latitude)
 Set Latitude. More...
 
 getLatitude ()
 Get Latitude. More...
 
 setLongitude ($a_longitude)
 Set Longitude. More...
 
 getLongitude ()
 Get Longitude. More...
 
 setLocationZoom ($a_locationzoom)
 Set Location Zoom. More...
 
 getLocationZoom ()
 Get Location Zoom. More...
 
getAppliedUsers ()
 
 isChild ($a_usr_id)
 
 __readAppliedUsers ($a_parent_id)
 
 checkUserId ()
 
 isCurrentUserActive ()
 
 getUserIdByLogin ($a_login)
 
 getLoginByUserId ($a_userid)
 
 _getNumberOfUsersForStyle ($a_skin, $a_style)
 skins and styles More...
 
 _getAllUserAssignedStyles ()
 skins and styles More...
 
 _moveUsersToStyle ($a_from_skin, $a_from_style, $a_to_skin, $a_to_style)
 skins and styles More...
 
 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...
 
 _getUsersForClipboadObject ($a_type, $a_id)
 get all users, that have a certain object within their clipboard More...
 
 removeObjectFromClipboard ($a_item_id, $a_type)
 remove object from user's personal clipboard More...
 
 _getImportedUserId ($i2_id)
 
 setAuthMode ($a_str)
 set auth mode @access public More...
 
 getAuthMode ($a_auth_key=false)
 get auth mode @access public More...
 
 setExternalAccount ($a_str)
 set external account More...
 
 getExternalAccount ()
 get external account More...
 
 _getNumberOfUsersPerAuthMode ()
 get number of users per auth mode More...
 
 _getLocalAccountsForEmail ($a_email)
 check whether external account and authentication method matches with a user More...
 
 _uploadPersonalPicture ($tmp_file, $obj_id)
 Create a personal picture image file from a temporary image file. 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 ()
 
 setInstantMessengerId ($a_im_type, $a_im_id)
 
 getInstantMessengerId ($a_im_type)
 
 setDelicious ($a_delicious)
 
 getDelicious ()
 
 _lookupFeedHash ($a_user_id, $a_create=false)
 Lookup news feed hash for user. More...
 
 _getFeedPass ($a_user_id)
 Lookup news feed password for user. More...
 
 _setFeedPass ($a_user_id, $a_password)
 Set news feed password for user. More...
 
 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...
 
 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
 ilObject ($a_id=0, $a_reference=true)
 Constructor @access public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ($a_force_db=false)
 read object data from db into object More...
 
 getId ()
 get object id @access public More...
 
 setId ($a_id)
 set object id @access public More...
 
 setRefId ($a_id)
 set reference id @access public More...
 
 getRefId ()
 get reference id @access public More...
 
 getType ()
 get object type @access public More...
 
 setType ($a_type)
 set object type @access public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title @access public More...
 
 getUntranslatedTitle ()
 get untranslated object title @access public More...
 
 setTitle ($a_title)
 set object title More...
 
 getDescription ()
 get object description More...
 
 setDescription ($a_desc)
 set object description More...
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 get import id More...
 
 setImportId ($a_import_id)
 set import id More...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id More...
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date @access public More...
 
 getLastUpdateDate ()
 get last update date @access public More...
 
 getDiskUsage ()
 
 setObjDataRecord ($a_record)
 set object_data record (note: this method should only be called from the ilObjectFactory class) 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...
 
 _getIdForImportId ($a_import_id)
 get current object id for import id (static) More...
 
 _lookupOwner ($a_id)
 lookup object owner More...
 
 _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update More...
 
 _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects. More...
 
 _setDeletedDate ($a_ref_id)
 only called in ilTree::saveSubTree More...
 
 _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
 _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
 _writeTitle ($a_obj_id, $a_title)
 write title to db (static) More...
 
 _writeDescription ($a_obj_id, $a_desc)
 write description to db (static) More...
 
 _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static) More...
 
 _isInTrash ($a_ref_id)
 checks wether object is in trash More...
 
 _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash More...
 
 _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 setParentRolePermissions ($a_parent_ref)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object More...
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) @access public More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 notify ($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0)
 notifys an object about an event occured Based on the event passed, each object may decide how it reacts. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false)
 Clone object permissions, put in tree ... More...
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 _lookupCreationDate ($a_id)
 Lookup creation date. More...
 

Static Public Member Functions

static _lookupGender ($a_user_id)
 Lookup gender. More...
 
static _lookupName ($a_user_id)
 lookup user name More...
 
static _lookupId ($a_user_str)
 lookup id by 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 _writePref ($a_usr_id, $a_keyword, $a_value)
 
static lookupMatriculation ($a_usr_id)
 Lookup matriculation. More...
 
static _lookupLanguage ($a_usr_id)
 
static hasActiveSession ($a_user_id)
 Check for simultaneous login. More...
 
 _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...
 
 _getAllUserLogins (&$ilias)
 STATIC METHOD get all user logins. More...
 
static _readUsersProfileData ($a_user_ids)
 STATIC METHOD get user data of selected users. More...
 
 _getAllUserData ($a_fields=NULL, $active=-1)
 STATIC METHOD get all user data. More...
 
static _addDesktopItem ($a_usr_id, $a_item_id, $a_type, $a_par="")
 add an item to user's personal desktop More...
 
static _dropDesktopItem ($a_usr_id, $a_item_id, $a_type)
 drop an item from user's personal desktop More...
 
static _removeItemFromDesktops ($a_id)
 removes object from all user's desktops @access public More...
 
static _isDesktopItem ($a_usr_id, $a_item_id, $a_type)
 check wether an item is on the users desktop or not More...
 
static preloadIsDesktopItem ($a_usr_id, $a_item_ids)
 Preload desktop item information. More...
 
static _lookupDesktopItems ($user_id, $a_types="")
 get all desktop items of user and specified type More...
 
static _getExternalAccountsByAuthMode ($a_auth_mode, $a_read_auth_default=false)
 Get list of external account by authentication method Note: If login == ext_account for two user with auth_mode 'default' and auth_mode 'ldap' The ldap auth mode chosen. More...
 
static _toggleActiveStatusOfUsers ($a_usr_ids, $a_status)
 Toggle active status of users. More...
 
static _lookupAuthMode ($a_usr_id)
 lookup auth mode More...
 
static _checkExternalAuthAccount ($a_auth, $a_account)
 check whether external account and authentication method matches with a user More...
 
static _getPersonalPicturePath ($a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false)
 Get path to personal picture. More...
 
static copyProfilePicturesToDirectory ($a_user_id, $a_dir)
 Get profile picture direcotory. More...
 
static _loginExists ($a_login, $a_user_id=0)
 check if a login name already exists You may exclude a user from the check by giving his user id as 2nd paramter @access public @access static More...
 
static _externalAccountExists ($a_external_account, $a_auth_mode)
 Check if an external account name already exists. More...
 
static _getUsersForRole ($role_id, $active=-1)
 return array of complete users which belong to a specific role More...
 
static _getUsersForFolder ($ref_id, $active)
 
static _getUsersForGroup ($a_mem_ids, $active=-1)
 return user data for group members More...
 
static _getUsersForIds ($a_mem_ids, $active=-1, $timelimitowner=-1)
 return user data for given user id More...
 
static _getUserData ($a_internalids)
 return user data for given user ids More...
 
static _getPreferences ($user_id)
 get preferences for user More...
 
static _resetLoginAttempts ($a_usr_id)
 
static _getLoginAttempts ($a_usr_id)
 
static _incrementLoginAttempts ($a_usr_id)
 
static _setUserInactive ($a_usr_id)
 
static _writeHistory ($a_usr_id, $a_login)
 
static _getAssociatedUsersOnline ($a_user_id, $a_no_anonymous=false)
 
static _generateRegistrationHash ($a_usr_id)
 Generates a unique hashcode for activating a user profile after registration. More...
 
static _verifyRegistrationHash ($a_hash)
 Verifies a registration hash. More...
 
static _getUserIdsByInactivityPeriod ($period)
 get ids of all users that have been inactive for at least the given period More...
 
static _getUserIdsByInactivationPeriod ($period)
 get ids of all users that have been inactivated since at least the given period More...
 
static _updateLastLogin ($a_usr_id, $a_last_login=null)
 STATIC METHOD updates the last_login field of user with given id to given or current date. More...
 
static getFirstLettersOfLastnames ()
 Get first letters of all lastnames. More...
 
static userExists ($a_usr_ids=array())
 
static findInterests ($a_term, $a_user_id=null, $a_field_id=null)
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId ($a_import_id)
 
static _getAllReferences ($a_id)
 get all reference ids of object More...
 
static _lookupTitle ($a_id)
 lookup object title More...
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 lookup object description More...
 
static _lookupObjId ($a_id)
 
static setDeletedDates ($a_ref_ids)
 Set deleted date @global type $ilDB. More...
 
static _lookupType ($a_id, $a_reference=false)
 lookup object type More...
 
static _lookupObjectId ($a_ref_id)
 lookup object id More...
 
static _exists ($a_id, $a_reference=false, $a_type=null)
 checks if an object exists in object_data@access public More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection. More...
 
static _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $a_obj_ids)
 Get long description data. More...
 
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns. More...
 
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course. More...
 

Data Fields

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

Static Public Attributes

static $is_desktop_item_loaded
 
static $is_desktop_item_cache
 

Protected Member Functions

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

Protected Attributes

 $passwd
 
 $passwd_type
 
 $password_encoding_type
 
 $password_salt = null
 
 $birthday
 
 $inactivation_date = null
 
 $interests_general
 
 $interests_help_offered
 
 $interests_help_looking
 

Static Protected Attributes

static $personal_image_cache = array()
 

Private Member Functions

 _lookup ($a_user_id, $a_field)
 Private function for lookup methods. More...
 

Static Private Member Functions

static getLoginFromAuth ()
 Gets the username from $ilAuth, and converts it into an ILIAS login name. More...
 
static initInactivationDate ($usrIds)
 @global type $ilDB More...
 
static resetInactivationDate ($usrIds)
 @global type $ilDB More...
 

Private Attributes

 $is_self_registered = false
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor @access public.

Parameters
integeruser_id

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

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 'm' => "salutation_m",
191 'f' => "salutation_f"
192 );*/
193 if ($a_user_id > 0)
194 {
195 $this->setId($a_user_id);
196 $this->read();
197 }
198 else
199 {
200 // TODO: all code in else-structure doesn't belongs in class user !!!
201 //load default data
202 $this->prefs = array();
203 //language
204 $this->prefs["language"] = $this->ilias->ini->readVariable("language","default");
205
206 //skin and pda support
207 $this->skin = $this->ilias->ini->readVariable("layout","skin");
208
209 $this->prefs["skin"] = $this->skin;
210 $this->prefs["show_users_online"] = "y";
211
212 //style (css)
213 $this->prefs["style"] = $this->ilias->ini->readVariable("layout","style");
214 }
215 }
const IL_PASSWD_PLAIN
read()
loads a record "user" from database @access private
setId($a_id)
set object id @access public
redirection script todo: (a better solution should control the processing via a xml file)
global $ilDB

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

+ Here is the call graph for this function:

Member Function Documentation

◆ __readAppliedUsers()

ilObjUser::__readAppliedUsers (   $a_parent_id)

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

2518 {
2519 global $ilDB;
2520
2521 $res = $ilDB->queryF("SELECT usr_id FROM usr_data ".
2522 "WHERE time_limit_owner = %s",
2523 array("integer"),
2524 array($a_parent_id));
2525 while ($row = $ilDB->fetchObject($res))
2526 {
2527 $this->applied_users[] = $row->usr_id;
2528
2529 // recursion
2530 $this->__readAppliedUsers($row->usr_id);
2531 }
2532 return true;
2533 }
__readAppliedUsers($a_parent_id)

References $ilDB, $res, $row, and __readAppliedUsers().

Referenced by __readAppliedUsers(), getAppliedUsers(), and isChild().

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

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

3058 {
3059 global $ilDB;
3060
3061 $item_set = $ilDB->queryF("SELECT * FROM desktop_item WHERE ".
3062 "item_id = %s AND type = %s AND user_id = %s",
3063 array("integer", "text", "integer"),
3064 array($a_item_id, $a_type, $a_usr_id));
3065
3066 // only insert if item is not already on desktop
3067 if (!$ilDB->fetchAssoc($item_set))
3068 {
3069 $ilDB->manipulateF("INSERT INTO desktop_item (item_id, type, user_id, parameters) VALUES ".
3070 " (%s,%s,%s,%s)", array("integer", "text", "integer", "text"),
3071 array($a_item_id,$a_type,$a_usr_id,$a_par));
3072 }
3073
3074 include_once './Services/Calendar/classes/class.ilCalendarCategories.php';
3076 }
static deletePDItemsCache($a_usr_id)
Delete cache (add remove desktop item)

References $ilDB, and ilCalendarCategories\deletePDItemsCache().

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

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

◆ _checkExternalAuthAccount()

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

check whether external account and authentication method matches with a user

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

3768 {
3769 global $ilDB,$ilSetting;
3770
3771 // Check directly with auth_mode
3772 $r = $ilDB->queryF("SELECT * FROM usr_data WHERE ".
3773 " ext_account = %s AND auth_mode = %s",
3774 array("text", "text"),
3775 array($a_account, $a_auth));
3776 if ($usr = $ilDB->fetchAssoc($r))
3777 {
3778 return $usr["login"];
3779 }
3780
3781 // For compatibility, check for login (no ext_account entry given)
3782 $res = $ilDB->queryF("SELECT login FROM usr_data ".
3783 "WHERE login = %s AND auth_mode = %s",
3784 array("text", "text"),
3785 array($a_account, $a_auth));
3786 if($usr = $ilDB->fetchAssoc($res))
3787 {
3788 return $usr['login'];
3789 }
3790
3791 // If auth_default == $a_auth => check for login
3792 if(ilAuthUtils::_getAuthModeName($ilSetting->get('auth_mode')) == $a_auth)
3793 {
3794 $res = $ilDB->queryF("SELECT login FROM usr_data WHERE ".
3795 " ext_account = %s AND auth_mode = %s",
3796 array("text", "text"),
3797 array($a_account, "default"));
3798 if ($usr = $ilDB->fetchAssoc($res))
3799 {
3800 return $usr["login"];
3801 }
3802 // Search for login (no ext_account given)
3803 $res = $ilDB->queryF("SELECT login FROM usr_data ".
3804 "WHERE login = %s AND (ext_account IS NULL OR ext_account = '') AND auth_mode = %s",
3805 array("text", "text"),
3806 array($a_account, "default"));
3807 if($usr = $ilDB->fetchAssoc($res))
3808 {
3809 return $usr["login"];
3810 }
3811 }
3812 return false;
3813 }
static _getAuthModeName($a_auth_key)
global $ilSetting
Definition: privfeed.php:40

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

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

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

◆ _deleteAllPref()

ilObjUser::_deleteAllPref (   $a_user_id)

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

Parameters
stringkeyword

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

1109 {
1110 global $ilDB;
1111
1112 $ilDB->manipulateF("DELETE FROM usr_pref WHERE usr_id = %s",
1113 array("integer"), array($a_user_id));
1114 }

References $ilDB.

Referenced by delete(), and writePrefs().

+ Here is the caller graph for this function:

◆ _doesLoginnameExistInHistory()

static ilObjUser::_doesLoginnameExistInHistory (   $a_login)
static

Checks wether the passed loginname already exists in history.

@access public

Parameters
string$a_loginLoginname
Returns
boolean true or false

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

938 {
939 global $ilDB;
940
941 $res = $ilDB->queryF('
942 SELECT * FROM loginname_history
943 WHERE login = %s',
944 array('text'), array($a_login));
945
946 return $ilDB->fetchAssoc($res) ? true : false;
947 }

References $ilDB, and $res.

Referenced by ilAccountRegistrationGUI\saveForm().

+ Here is the caller graph for this function:

◆ _dropDesktopItem()

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

drop an item from user's personal desktop

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

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

3119 {
3120 global $ilDB;
3121
3122 $ilDB->manipulateF("DELETE FROM desktop_item WHERE ".
3123 " item_id = %s AND type = %s AND user_id = %s",
3124 array("integer", "text", "integer"),
3125 array($a_item_id, $a_type, $a_usr_id));
3126
3127 include_once './Services/Calendar/classes/class.ilCalendarCategories.php';
3129 }

References $ilDB, and ilCalendarCategories\deletePDItemsCache().

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

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

◆ _externalAccountExists()

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

Check if an external account name already exists.

@access public

Parameters
stringexternal account
stringauth mode

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

4494 {
4495 global $ilDB;
4496
4497 $res = $ilDB->queryF("SELECT * FROM usr_data ".
4498 "WHERE ext_account = %s AND auth_mode = %s",
4499 array("text", "text"),
4500 array($a_external_account, $a_auth_mode));
4501 return $ilDB->fetchAssoc($res) ? true :false;
4502 }

References $ilDB, and $res.

Referenced by ilObjUserTest\testAuthAndEmailMethods().

+ Here is the caller graph for this function:

◆ _generateRegistrationHash()

static ilObjUser::_generateRegistrationHash (   $a_usr_id)
static

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

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

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

5001 {
5002 global $ilDB;
5003
5004 do
5005 {
5006 $continue = false;
5007
5008 $hashcode = substr(md5(uniqid(rand(), true)), 0, 16);
5009
5010 $res = $ilDB->queryf('
5011 SELECT COUNT(usr_id) cnt FROM usr_data
5012 WHERE reg_hash = %s',
5013 array('text'),
5014 array($hashcode));
5015 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
5016 {
5017 if($row->cnt > 0) $continue = true;
5018 break;
5019 }
5020
5021 if($continue) continue;
5022
5023 $ilDB->manipulateF('
5024 UPDATE usr_data
5025 SET reg_hash = %s
5026 WHERE usr_id = %s',
5027 array('text', 'integer'),
5028 array($hashcode, (int)$a_usr_id)
5029 );
5030
5031 break;
5032
5033 } while(true);
5034
5035 return $hashcode;
5036 }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11

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

◆ _getAllUserAssignedStyles()

ilObjUser::_getAllUserAssignedStyles ( )

skins and styles

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

3005 {
3006 global $ilDB;
3007
3008 $q = "SELECT DISTINCT up1.value style, up2.value skin FROM usr_pref up1, usr_pref up2 ".
3009 " WHERE up1.keyword = ".$ilDB->quote("style", "text").
3010 " AND up2.keyword = ".$ilDB->quote("skin", "text").
3011 " AND up1.usr_id = up2.usr_id";
3012
3013 $sty_set = $ilDB->query($q);
3014
3015 $styles = array();
3016 while($sty_rec = $ilDB->fetchAssoc($sty_set))
3017 {
3018 $styles[] = $sty_rec["skin"].":".$sty_rec["style"];
3019 }
3020
3021 return $styles;
3022 }

References $ilDB.

Referenced by ilSystemStylesTableGUI\getStyles(), ilObjStyleSettingsGUI\moveUserStylesObject(), and ilObjUserTest\testMiscellaneous().

+ Here is the caller graph for this function:

◆ _getAllUserData()

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

STATIC METHOD get all user data.

Parameters
arraydesired columns
Returns
array of user data @access public

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

2872 {
2873 global $ilDB;
2874
2875 $result_arr = array();
2876 $types = array();
2877 $values = array();
2878
2879 if ($a_fields !== NULL and is_array($a_fields))
2880 {
2881 if (count($a_fields) == 0)
2882 {
2883 $select = "*";
2884 }
2885 else
2886 {
2887 if (($usr_id_field = array_search("usr_id",$a_fields)) !== false)
2888 unset($a_fields[$usr_id_field]);
2889
2890 $select = implode(",",$a_fields).",usr_data.usr_id";
2891 // online time
2892 if(in_array('online_time',$a_fields))
2893 {
2894 $select .= ",ut_online.online_time ";
2895 }
2896 }
2897
2898 $q = "SELECT ".$select." FROM usr_data ";
2899
2900 // Add online_time if desired
2901 // Need left join here to show users that never logged in
2902 if(in_array('online_time',$a_fields))
2903 {
2904 $q .= "LEFT JOIN ut_online ON usr_data.usr_id = ut_online.usr_id ";
2905 }
2906
2907 switch ($active)
2908 {
2909 case 0:
2910 case 1:
2911 $q .= "WHERE active = ".$ilDB->quote($active, "integer");
2912 break;
2913 case 2:
2914 $q .= "WHERE time_limit_unlimited= ".$ilDB->quote(0, "integer");;
2915 break;
2916 case 3:
2917 $qtemp = $q . ", rbac_ua, object_data WHERE rbac_ua.rol_id = object_data.obj_id AND ".
2918 $ilDB->like("object_data.title", "text", "%crs%")." AND usr_data.usr_id = rbac_ua.usr_id";
2919 $r = $ilDB->query($qtemp);
2920 $course_users = array();
2921 while ($row = $ilDB->fetchAssoc($r))
2922 {
2923 array_push($course_users, $row["usr_id"]);
2924 }
2925 if (count($course_users))
2926 {
2927 $q .= " WHERE ".$ilDB->in("usr_data.usr_id", $course_users, true, "integer")." ";
2928 }
2929 else
2930 {
2931 return $result_arr;
2932 }
2933 break;
2934 case 4:
2935 $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"]));
2936 $q.= " AND last_login < ".$ilDB->quote($date, "timestamp");
2937 break;
2938 case 5:
2939 $ref_id = $_SESSION["user_filter_data"];
2940 if ($ref_id)
2941 {
2942 $q .= " LEFT JOIN obj_members ON usr_data.usr_id = obj_members.usr_id ".
2943 "WHERE obj_members.obj_id = (SELECT obj_id FROM object_reference ".
2944 "WHERE ref_id = ".$ilDB->quote($ref_id, "integer").") ";
2945 }
2946 break;
2947 case 6:
2948 global $rbacreview;
2949 $ref_id = $_SESSION["user_filter_data"];
2950 if ($ref_id)
2951 {
2952 $local_roles = $rbacreview->getRolesOfRoleFolder($ref_id,false);
2953 if (is_array($local_roles) && count($local_roles))
2954 {
2955 $q.= " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE ".
2956 $ilDB->in("rbac_ua.rol_id", $local_roles, false, "integer")." ";
2957 }
2958 }
2959 break;
2960 case 7:
2961 $rol_id = $_SESSION["user_filter_data"];
2962 if ($rol_id)
2963 {
2964 $q .= " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE rbac_ua.rol_id = ".
2965 $ilDB->quote($rol_id, "integer");
2966 }
2967 break;
2968 }
2969 $r = $ilDB->query($q);
2970
2971 while ($row = $ilDB->fetchAssoc($r))
2972 {
2973 $result_arr[] = $row;
2974 }
2975 }
2976
2977 return $result_arr;
2978 }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']

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

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

+ Here is the caller graph for this function:

◆ _getAllUserLogins()

ilObjUser::_getAllUserLogins ( $ilias)
static

STATIC METHOD get all user logins.

Parameters
iliasobject
Returns
array of logins @access public

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

2832 {
2833 global $ilDB;
2834
2835 $res = $ilDB->query("SELECT login FROM usr_data");
2836 while($row = $ilDB->fetchObject($res))
2837 {
2838 $logins[] = $row->login;
2839 }
2840 return $logins ? $logins : array();
2841 }

References $ilDB, $res, and $row.

◆ _getAssociatedUsersOnline()

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

the current user has also a local role.

@param      integer user_id User ID of the current user.
@return     array

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

4906 {
4907 global $ilias, $ilDB;
4908
4909 $pd_set = new ilSetting("pd");
4910 $atime = $pd_set->get("user_activity_time") * 60;
4911 $ctime = time();
4912 $no_anonym = ($a_no_anonymous)
4913 ? "AND user_id <> ".$ilDB->quote(ANONYMOUS_USER_ID, "integer")." "
4914 : "";
4915
4916 // Get a list of object id's of all courses and groups for which
4917 // the current user has local roles.
4918 // Note: we have to use DISTINCT here, because a user may assume
4919 // multiple roles in a group or a course.
4920 $q = "SELECT DISTINCT dat.obj_id as obj_id ".
4921 "FROM rbac_ua ua ".
4922 "JOIN rbac_fa fa ON fa.rol_id = ua.rol_id ".
4923 "JOIN object_reference r1 ON r1.ref_id = fa.parent ".
4924 "JOIN tree ON tree.child = r1.ref_id ".
4925 "JOIN object_reference r2 ON r2.ref_id = tree.child ". // #17674 - rolf is gone
4926 "JOIN object_data dat ON dat.obj_id = r2.obj_id ".
4927 "WHERE ua.usr_id = ".$ilDB->quote($a_user_id, "integer")." ".
4928 "AND fa.assign = ".$ilDB->quote("y", "text")." ".
4929 "AND dat.type IN (".$ilDB->quote("crs", "text").",".
4930 $ilDB->quote("grp", "text").")";
4931 $r = $ilDB->query($q);
4932
4933 while ($row = $ilDB->fetchAssoc($r))
4934 {
4935 $groups_and_courses_of_user[] = $row["obj_id"];
4936 }
4937
4938 require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
4939 $tos_condition = '';
4940 if(ilTermsOfServiceHelper::isEnabled())
4941 {
4942 $tos_condition = " AND (agree_date IS NOT NULL OR ud.usr_id = " . $ilDB->quote(SYSTEM_USER_ID, 'integer') . ") ";
4943 }
4944
4945 // If the user is not in a course or a group, he has no associated users.
4946 if (count($groups_and_courses_of_user) == 0)
4947 {
4948 $q = "SELECT count(user_id) as num,ctime,user_id,firstname,lastname,title,login,last_login ".
4949 "FROM usr_session ".
4950 "JOIN usr_data ud ON user_id = ud.usr_id ".
4951 "WHERE user_id = ".$ilDB->quote($a_user_id, "integer")." ".
4952 $no_anonym.
4953 $tos_condition.
4954 "AND expires > ".$ilDB->quote(time(), "integer")." ".
4955 "GROUP BY user_id,ctime,firstname,lastname,title,login,last_login";
4956 $r = $ilDB->query($q);
4957 }
4958 else
4959 {
4960 $q = "SELECT count(user_id) as num,s.ctime,s.user_id,ud.firstname,ud.lastname,ud.title,ud.login,ud.last_login ".
4961 "FROM usr_session s ".
4962 "JOIN usr_data ud ON ud.usr_id = s.user_id ".
4963 "JOIN rbac_ua ua ON ua.usr_id = s.user_id ".
4964 "JOIN rbac_fa fa ON fa.rol_id = ua.rol_id ".
4965 "JOIN tree ON tree.child = fa.parent ".
4966 "JOIN object_reference or1 ON or1.ref_id = tree.child ". // #17674 - rolf is gone
4967 "JOIN object_data od ON od.obj_id = or1.obj_id ".
4968 "LEFT JOIN usr_pref p ON (p.usr_id = ud.usr_id AND p.keyword = ".
4969 $ilDB->quote("hide_own_online_status", "text").") ".
4970 "WHERE s.user_id != 0 ".
4971 $no_anonym.
4972 "AND (p.value IS NULL OR NOT p.value = ".$ilDB->quote("y", "text").") ".
4973 "AND s.expires > ".$ilDB->quote(time(),"integer")." ".
4974 "AND fa.assign = ".$ilDB->quote("y", "text")." ".
4975 $tos_condition.
4976 "AND ".$ilDB->in("od.obj_id", $groups_and_courses_of_user, false, "integer")." ".
4977 "GROUP BY s.user_id,s.ctime,ud.firstname,ud.lastname,ud.title,ud.login,ud.last_login ".
4978 "ORDER BY ud.lastname, ud.firstname";
4979 $r = $ilDB->query($q);
4980 }
4981
4982 while ($user = $ilDB->fetchAssoc($r))
4983 {
4984 if ($atime <= 0
4985 || $user["ctime"] + $atime > $ctime)
4986 {
4987 $users[$user["user_id"]] = $user;
4988 }
4989 }
4990
4991 return $users ? $users : array();
4992 }
ILIAS Setting Class.

References $ilDB, $ilias, and $row.

Referenced by ilUtil\getAssociatedUsersOnline().

+ Here is the caller graph for this function:

◆ _getExternalAccountsByAuthMode()

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

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

@access public

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

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

3675 {
3676 global $ilDB,$ilSetting;
3677
3678 include_once('./Services/Authentication/classes/class.ilAuthUtils.php');
3679 $q = "SELECT login,usr_id,ext_account,auth_mode FROM usr_data ".
3680 "WHERE auth_mode = %s";
3681 $types[] = "text";
3682 $values[] = $a_auth_mode;
3683 if($a_read_auth_default and ilAuthUtils::_getAuthModeName($ilSetting->get('auth_mode',AUTH_LOCAL)) == $a_auth_mode)
3684 {
3685 $q.= " OR auth_mode = %s ";
3686 $types[] = "text";
3687 $values[] = 'default';
3688 }
3689
3690 $res = $ilDB->queryF($q, $types, $values);
3691 while ($row = $ilDB->fetchObject($res))
3692 {
3693 if($row->auth_mode == 'default')
3694 {
3695 $accounts[$row->usr_id] = $row->login;
3696 }
3697 else
3698 {
3699 $accounts[$row->usr_id] = $row->ext_account;
3700 }
3701 }
3702 return $accounts ? $accounts : array();
3703 }
const AUTH_LOCAL

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

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

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

◆ _getFeedPass()

ilObjUser::_getFeedPass (   $a_user_id)

Lookup news feed password for user.

Parameters
integeruser_id
Returns
string feed_password md5-encoded, or false

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

4426 {
4427 global $ilDB;
4428
4429 if ($a_user_id > 0)
4430 {
4431 return ilObjUser::_lookupPref($a_user_id, "priv_feed_pass");
4432 }
4433 return false;
4434 }
_lookupPref($a_usr_id, $a_keyword)

References $ilDB, and _lookupPref().

+ Here is the call graph for this function:

◆ _getImportedUserId()

ilObjUser::_getImportedUserId (   $i2_id)

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

3601 {
3602 global $ilDB;
3603
3604 $query = "SELECT obj_id FROM object_data WHERE import_id = ".
3605 $ilDB->quote($i2_id, "text");
3606
3607 $res = $ilDB->query($query);
3608 while($row = $ilDB->fetchObject($res))
3609 {
3610 $id = $row->obj_id;
3611 }
3612 return $id ? $id : 0;
3613 }

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

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

+ Here is the caller graph for this function:

◆ _getLastHistoryDataByUserId()

static ilObjUser::_getLastHistoryDataByUserId (   $a_usr_id)
static

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

Throws an ilUserException in case no entry could be found.

@access public

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

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

962 {
963 global $ilDB;
964
965 $ilDB->setLimit(1, 0);
966 $res = $ilDB->queryF('
967 SELECT login, history_date FROM loginname_history
968 WHERE usr_id = %s ORDER BY history_date DESC',
969 array('integer'), array($a_usr_id));
970 $row = $ilDB->fetchAssoc($res);
971 if(!is_array($row) || !count($row)) throw new ilUserException('');
972
973 return array(
974 $row['login'], $row['history_date']
975 );
976 }
Class for user related exception handling in ILIAS.

References $ilDB, $res, and $row.

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

+ Here is the caller graph for this function:

◆ _getLocalAccountsForEmail()

ilObjUser::_getLocalAccountsForEmail (   $a_email)

check whether external account and authentication method matches with a user

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

3839 {
3840 global $ilDB, $ilSetting;
3841
3842 // default set to local (1)?
3843
3844 $q = "SELECT * FROM usr_data WHERE ".
3845 " email = %s AND (auth_mode = %s ";
3846 $types = array("text", "text");
3847 $values = array($a_email, "local");
3848
3849 if ($ilSetting->get("auth_mode") == 1)
3850 {
3851 $q.=" OR auth_mode = %s";
3852 $types[] = "text";
3853 $values[] = "default";
3854 }
3855
3856 $q.= ")";
3857
3858 $users = array();
3859 $usr_set = $ilDB->queryF($q, $types, $values);
3860 while ($usr_rec = $ilDB->fetchAssoc($usr_set))
3861 {
3862 $users[$usr_rec["usr_id"]] = $usr_rec["login"];
3863 }
3864
3865 return $users;
3866 }

References $ilDB, and $ilSetting.

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

+ Here is the caller graph for this function:

◆ _getLoginAttempts()

static ilObjUser::_getLoginAttempts (   $a_usr_id)
static

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

4739 {
4740 global $ilDB;
4741
4742 $query = "SELECT login_attempts FROM usr_data WHERE usr_id = %s";
4743 $result = $ilDB->queryF( $query, array('integer'), array($a_usr_id) );
4744 $record = $ilDB->fetchAssoc( $result );
4745 $login_attempts = $record['login_attempts'];
4746
4747 return $login_attempts;
4748 }
$result

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

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

+ Here is the caller graph for this function:

◆ _getNumberOfUsersForStyle()

ilObjUser::_getNumberOfUsersForStyle (   $a_skin,
  $a_style 
)

skins and styles

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

2984 {
2985 global $ilDB;
2986
2987 $q = "SELECT count(*) as cnt FROM usr_pref up1, usr_pref up2 ".
2988 " WHERE up1.keyword= ".$ilDB->quote("style", "text").
2989 " AND up1.value= ".$ilDB->quote($a_style, "text").
2990 " AND up2.keyword= ".$ilDB->quote("skin", "text").
2991 " AND up2.value= ".$ilDB->quote($a_skin, "text").
2992 " AND up1.usr_id = up2.usr_id ";
2993
2994 $cnt_set = $ilDB->query($q);
2995
2996 $cnt_rec = $ilDB->fetchAssoc($cnt_set);
2997
2998 return $cnt_rec["cnt"];
2999 }

References $ilDB.

Referenced by ilStyleDefinition\getAllSkinStyles(), ilSystemStylesTableGUI\getStyles(), ilObjStyleSettingsGUI\saveStyleSettingsObject(), and ilObjUserTest\testMiscellaneous().

+ Here is the caller graph for this function:

◆ _getNumberOfUsersPerAuthMode()

ilObjUser::_getNumberOfUsersPerAuthMode ( )

get number of users per auth mode

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

3819 {
3820 global $ilDB;
3821
3822 $r = $ilDB->query("SELECT count(*) AS cnt, auth_mode FROM usr_data ".
3823 "GROUP BY auth_mode");
3824 $cnt_arr = array();
3825 while($cnt = $ilDB->fetchAssoc($r))
3826 {
3827 $cnt_arr[$cnt["auth_mode"]] = $cnt["cnt"];
3828 }
3829
3830 return $cnt_arr;
3831 }

References $ilDB.

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

+ Here is the caller graph for this function:

◆ _getPersonalPicturePath()

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

Get path to personal picture.

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

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

3935 {
3936 global $ilDB;
3937
3938 // BEGIN DiskQuota: Fetch all user preferences in a single query
3939 $res = $ilDB->queryF("SELECT * FROM usr_pref WHERE ".
3940 "keyword IN (%s,%s) ".
3941 "AND usr_id = %s",
3942 array("text", "text", "integer"),
3943 array('public_upload', 'public_profile', $a_usr_id));
3944 while ($row = $ilDB->fetchAssoc($res))
3945 {
3946 switch ($row['keyword'])
3947 {
3948 case 'public_upload' :
3949 $upload = $row['value'] == 'y';
3950 break;
3951 case 'public_profile' :
3952 $profile = ($row['value'] == 'y' ||
3953 $row['value'] == 'g');
3954 break;
3955 }
3956 }
3957
3958 // END DiskQuota: Fetch all user preferences in a single query
3959 $webspace_dir = "";
3960 if(defined('ILIAS_MODULE'))
3961 {
3962 $webspace_dir = ('.'.$webspace_dir);
3963 }
3964 $webspace_dir .= ('./'.ilUtil::getWebspaceDir());
3965
3966 $image_dir = $webspace_dir."/usr_images";
3967 // BEGIN DiskQuota: Support 'big' user images
3968 if ($a_size == 'big')
3969 {
3970 $thumb_file = $image_dir."/usr_".$a_usr_id.".jpg";
3971 }
3972 else
3973 {
3974 $thumb_file = $image_dir."/usr_".$a_usr_id."_".$a_size.".jpg";
3975 }
3976 // END DiskQuota: Support 'big' user images
3977
3978 if((($upload && $profile) || $a_force_pic)
3979 && @is_file($thumb_file))
3980 {
3981 $file = $thumb_file."?t=".rand(1, 99999);
3982 }
3983 else
3984 {
3985 if (!$a_prevent_no_photo_image)
3986 {
3987 // we only have xsmall and xxsmall for this
3988 if($a_size == "small" || $a_size == "big")
3989 {
3990 $a_size = "xsmall";
3991 }
3992 $file = ilUtil::getImagePath("no_photo_".$a_size.".jpg");
3993 }
3994 }
3995
3996 return $file;
3997 }
print $file
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References $file, $ilDB, $res, $row, and ilUtil\getImagePath().

Referenced by ilUserProfile\addStandardFieldsToForm(), ilObjBlogGUI\buildExportFile(), ilPortfolioHTMLExport\buildExportFile(), ilWikiContributorsTableGUI\fillRow(), ilUsersOnlineBlockGUI\fillRow(), ilRepositoryUserResultTableGUI\fillRow(), ilPublicUserProfileGUI\getEmbeddable(), ilUserUtil\getNamePresentation(), ilNoteGUI\getNoteListHTML(), getPersonalPicturePath(), ilObjUserGUI\initForm(), ilObjPortfolioBaseGUI\renderFullscreenHeader(), ilObjBlogGUI\renderFullscreenHeader(), ilPublicUserProfileGUI\renderTitle(), and ilPersonalProfileGUI\showPublicProfileFields().

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

◆ _getPreferences()

static ilObjUser::_getPreferences (   $user_id)
static

get preferences for user

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

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

4710 {
4711 global $ilDB;
4712
4713 $prefs = array();
4714
4715 $r = $ilDB->queryF("SELECT * FROM usr_pref WHERE usr_id = %s",
4716 array("integer"), array($user_id));
4717
4718 while($row = $ilDB->fetchAssoc($r))
4719 {
4720 $prefs[$row["keyword"]] = $row["value"];
4721 }
4722
4723 return $prefs;
4724 }

References $ilDB, $prefs, and $row.

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

+ Here is the caller graph for this function:

◆ _getUserData()

static ilObjUser::_getUserData (   $a_internalids)
static

return user data for given user ids

Parameters
arrayof internal ids or numerics $a_internalids

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

4661 {
4662 global $ilDB;
4663
4664 $ids = array();
4665 if (is_array($a_internalids)) {
4666 foreach ($a_internalids as $internalid) {
4667 if (is_numeric ($internalid))
4668 {
4669 $ids[] = $internalid;
4670 }
4671 else
4672 {
4673 $parsedid = ilUtil::__extractId($internalid, IL_INST_ID);
4674 if (is_numeric($parsedid) && $parsedid > 0)
4675 {
4676 $ids[] = $parsedid;
4677 }
4678 }
4679 }
4680 }
4681 if (count($ids) == 0)
4682 $ids [] = -1;
4683
4684 $query = "SELECT usr_data.*, usr_pref.value AS language
4685 FROM usr_data
4686 LEFT JOIN usr_pref
4687 ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
4688 WHERE ".$ilDB->in("usr_data.usr_id", $ids, false, "integer");
4689 $values[] = "language";
4690 $types[] = "text";
4691
4692 $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4693
4694 $data = array();
4695 $result = $ilDB->queryF($query, $types, $values);
4696 while ($row = $ilDB->fetchAssoc($result))
4697 {
4698 $data[] = $row;
4699 }
4700 return $data;
4701 }
static __extractId($ilias_id, $inst_id)
extract ref id from role title, e.g.

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

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

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

◆ _getUserIdsByEmail()

ilObjUser::_getUserIdsByEmail (   $a_email)
static

STATIC METHOD get all user_ids of an email address.

Parameters
stringemail of user
Returns
integer id of user

@access public

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

2639 {
2640 global $ilias, $ilDB;
2641
2642 $res = $ilDB->queryF("SELECT login FROM usr_data ".
2643 "WHERE email = %s and active = 1",
2644 array("text"),
2645 array($a_email));
2646 $ids = array ();
2647 while($row = $ilDB->fetchObject($res))
2648 {
2649 $ids[] = $row->login;
2650 }
2651
2652 return $ids;
2653 }

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

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

+ Here is the caller graph for this function:

◆ _getUserIdsByInactivationPeriod()

static ilObjUser::_getUserIdsByInactivationPeriod (   $period)
static

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

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

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

5138 {
5140 $field = 'inactivation_date';
5142
5143 if( !(int)$period ) throw new ilException('no valid period given');
5144
5145 global $ilDB;
5146
5147 $date = date( 'Y-m-d H:i:s', (time() - ((int)$period * 24 * 60 * 60)) );
5148
5149 $query = "SELECT usr_id FROM usr_data WHERE $field < %s AND active = %s";
5150
5151 $res = $ilDB->queryF($query, array('timestamp', 'integer'), array($date, 0));
5152
5153 $ids = array();
5154 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
5155 {
5156 $ids[] = $row->usr_id;
5157 }
5158
5159 return $ids;
5160 }
Base class for ILIAS Exception handling.

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilCronDeleteInactivatedUserAccounts\run().

+ Here is the caller graph for this function:

◆ _getUserIdsByInactivityPeriod()

static ilObjUser::_getUserIdsByInactivityPeriod (   $period)
static

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

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

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

5109 {
5110 if( !(int)$period ) throw new ilException('no valid period given');
5111
5112 global $ilDB;
5113
5114 $date = date( 'Y-m-d H:i:s', (time() - ((int)$period * 24 * 60 * 60)) );
5115
5116 $query = "SELECT usr_id FROM usr_data WHERE last_login < %s OR (ISNULL(last_login) AND create_date < %s)";
5117
5118 $res = $ilDB->queryF($query, array('timestamp', 'timestamp'), array($date, $date));
5119
5120 $ids = array();
5121 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
5122 {
5123 $ids[] = $row->usr_id;
5124 }
5125
5126 return $ids;
5127 }

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

◆ _getUsersForClipboadObject()

ilObjUser::_getUsersForClipboadObject (   $a_type,
  $a_id 
)

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

3566 {
3567 global $ilDB;
3568
3569 $q = "SELECT DISTINCT user_id FROM personal_clipboard WHERE ".
3570 "item_id = ".$ilDB->quote($a_id, "integer")." AND ".
3571 "type = ".$ilDB->quote($a_type, "text");
3572 $user_set = $ilDB->query($q);
3573 $users = array();
3574 while ($user_rec = $ilDB->fetchAssoc($user_set))
3575 {
3576 $users[] = $user_rec["user_id"];
3577 }
3578
3579 return $users;
3580 }

References $ilDB.

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

+ Here is the caller graph for this function:

◆ _getUsersForFolder()

static ilObjUser::_getUsersForFolder (   $ref_id,
  $active 
)
static
  get users for a category or from system folder
Parameters
$ref_idref id of object
$activecan be -1 (ignore), 1 = active, 0 = not active user

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

4554 {
4555 global $ilDB;
4556 $data = array();
4557 $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 ";
4558 $types[] = "text";
4559 $values[] = "language";
4560
4561 if (is_numeric($active) && $active > -1)
4562 {
4563 $query .= " AND usr_data.active = %s";
4564 $values[] = $active;
4565 $types[] = "integer";
4566 }
4567
4568 if ($ref_id != USER_FOLDER_ID)
4569 {
4570 $query.= " AND usr_data.time_limit_owner = %s";
4571 $values[] = $ref_id;
4572 $types[] = "integer";
4573 }
4574
4575 $query .= " AND usr_data.usr_id != %s ";
4576 $values[] = ANONYMOUS_USER_ID;
4577 $types[] = "integer";
4578
4579 $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4580
4581 $result = $ilDB->queryF($query, $types, $values);
4582 $data = array();
4583 while ($row = $ilDB->fetchAssoc($result))
4584 {
4585 array_push($data, $row);
4586 }
4587
4588 return $data;
4589 }
const USER_FOLDER_ID
Class ilObjUserFolder.

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

Referenced by ilSoapUserAdministration\getUsersForContainer().

+ Here is the caller graph for this function:

◆ _getUsersForGroup()

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

return user data for group members

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

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

4598 {
4599 return ilObjUser::_getUsersForIds($a_mem_ids, $active);
4600 }
static _getUsersForIds($a_mem_ids, $active=-1, $timelimitowner=-1)
return user data for given user id

References $active, and _getUsersForIds().

Referenced by ilSoapUserAdministration\getUsersForContainer().

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

◆ _getUsersForIds()

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

return user data for given user id

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

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

4609 {
4610 global $rbacadmin, $rbacreview, $ilDB;
4611
4612 // quote all ids
4613 $ids = array();
4614 foreach ($a_mem_ids as $mem_id) {
4615 $ids [] = $ilDB->quote($mem_id);
4616 }
4617
4618 $query = "SELECT usr_data.*, usr_pref.value AS language
4619 FROM usr_data
4620 LEFT JOIN usr_pref ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
4621 WHERE ".$ilDB->in("usr_data.usr_id", $ids, false, "integer")."
4622 AND usr_data.usr_id != %s";
4623 $values[] = "language";
4624 $types[] = "text";
4625 $values[] = ANONYMOUS_USER_ID;
4626 $types[] = "integer";
4627
4628 if (is_numeric($active) && $active > -1)
4629 {
4630 $query .= " AND active = %s";
4631 $values[] = $active;
4632 $types[] = "integer";
4633 }
4634
4635 if ($timelimitowner != USER_FOLDER_ID && $timelimitowner != -1)
4636 {
4637 $query.= " AND usr_data.time_limit_owner = %s";
4638 $values[] = $timelimitowner;
4639 $types[] = "integer";
4640
4641 }
4642
4643 $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4644
4645 $result = $ilDB->queryF($query, $types, $values);
4646 while ($row = $ilDB->fetchAssoc($result))
4647 {
4648 $mem_arr[] = $row;
4649 }
4650
4651 return $mem_arr ? $mem_arr : array();
4652 }

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

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

+ Here is the caller graph for this function:

◆ _getUsersForRole()

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

return array of complete users which belong to a specific role

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

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

4511 {
4512 global $ilDB, $rbacreview;
4513 $data = array();
4514
4515 $ids = $rbacreview->assignedUsers($role_id);
4516
4517 if (count ($ids) == 0)
4518 {
4519 $ids = array (-1);
4520 }
4521
4522 $query = "SELECT usr_data.*, usr_pref.value AS language
4523 FROM usr_data
4524 LEFT JOIN usr_pref ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
4525 WHERE ".$ilDB->in("usr_data.usr_id", $ids, false, "integer");
4526 $values[] = "language";
4527 $types[] = "text";
4528
4529
4530 if (is_numeric($active) && $active > -1)
4531 {
4532 $query .= " AND usr_data.active = %s";
4533 $values[] = $active;
4534 $types[] = "integer";
4535 }
4536
4537 $query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
4538
4539 $r = $ilDB->queryF($query, $types, $values);
4540 $data = array();
4541 while ($row = $ilDB->fetchAssoc($r))
4542 {
4543 $data[] = $row;
4544 }
4545 return $data;
4546 }

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

Referenced by ilSoapUserAdministration\getUserForRole().

+ Here is the caller graph for this function:

◆ _incrementLoginAttempts()

static ilObjUser::_incrementLoginAttempts (   $a_usr_id)
static

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

4751 {
4752 global $ilDB;
4753
4754 $query = "UPDATE usr_data SET login_attempts = (login_attempts + 1) WHERE usr_id = %s";
4755 $affected = $ilDB->manipulateF( $query, array('integer'), array($a_usr_id) );
4756
4757 if($affected) return true;
4758 else return false;
4759 }

References $ilDB, and $query.

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

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

3182 {
3183 global $ilDB;
3184
3185 if (self::$is_desktop_item_loaded[$a_usr_id.":".$a_item_id])
3186 {
3187 return self::$is_desktop_item_cache[$a_usr_id.":".$a_item_id.":".$a_type];
3188 }
3189 $item_set = $ilDB->queryF("SELECT item_id FROM desktop_item WHERE ".
3190 "item_id = %s AND type = %s AND user_id = %s",
3191 array("integer", "text", "integer"),
3192 array($a_item_id, $a_type, $a_usr_id));
3193
3194 if ($ilDB->fetchAssoc($item_set))
3195 {
3196 return true;
3197 }
3198 else
3199 {
3200 return false;
3201 }
3202 }

References $ilDB.

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

+ Here is the caller graph for this function:

◆ _loginExists()

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

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

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

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

4459 {
4460 global $ilDB;
4461
4462 $q = "SELECT DISTINCT login, usr_id FROM usr_data ".
4463 "WHERE login = %s";
4464 $types[] = "text";
4465 $values[] = $a_login;
4466
4467 if ($a_user_id != 0)
4468 {
4469 $q.= " AND usr_id != %s ";
4470 $types[] = "integer";
4471 $values[] = $a_user_id;
4472 }
4473
4474 $r = $ilDB->queryF($q, $types, $values);
4475
4476 if ($row = $ilDB->fetchAssoc($r))
4477 {
4478 return $row['usr_id'];
4479 }
4480 return false;
4481 }

References $ilDB, and $row.

Referenced by ilMail\__substituteRecipients(), ilSoapUserAdministration\__validateUserData(), ilUserLoginInputGUI\checkInput(), ilCalendarAppointmentGUI\loadNotificationRecipients(), ilAuthBase\loginObserver(), ilLuceneQueryParser\replaceOwnerCallback(), ilAccountRegistrationGUI\saveForm(), ilPersonalProfileGUI\savePersonalData(), ilConsultationHourAppointments\setManager(), ilMailSearchGUI\showResults(), ilObjUserTest\testCreateSetLookupDelete(), and ilObjUserGUI\updateObjectOld().

+ Here is the caller graph for this function:

◆ _lookup()

ilObjUser::_lookup (   $a_user_id,
  $a_field 
)
private

Private function for lookup methods.

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

695 {
696 global $ilDB;
697
698 $res = $ilDB->queryF("SELECT ".$a_field." FROM usr_data WHERE usr_id = %s",
699 array("integer"), array($a_user_id));
700
701 while($set = $ilDB->fetchAssoc($res))
702 {
703 return $set[$a_field];
704 }
705 return false;
706 }

References $ilDB, and $res.

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

+ Here is the caller graph for this function:

◆ _lookupActive()

ilObjUser::_lookupActive (   $a_usr_id)

Check user account active.

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

2217 {
2218 global $ilDB;
2219
2220 $query = 'SELECT usr_id FROM usr_data '.
2221 'WHERE active = '.$ilDB->quote(1,'integer').' '.
2222 'AND usr_id = '.$ilDB->quote($a_usr_id,'integer');
2223 $res = $ilDB->query($query);
2224 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
2225 {
2226 return true;
2227 }
2228 return false;
2229 }

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

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

+ Here is the caller graph for this function:

◆ _lookupAuthMode()

static ilObjUser::_lookupAuthMode (   $a_usr_id)
static

lookup auth mode

@access public

Parameters
intusr_id

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

3757 {
3758 return (string) ilObjUser::_lookup($a_usr_id, "auth_mode");
3759 }
_lookup($a_user_id, $a_field)
Private function for lookup methods.

References _lookup().

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

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

◆ _lookupClientIP()

ilObjUser::_lookupClientIP (   $a_user_id)

Lookup client ip.

Parameters
intuser id
Returns
string client ip

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

768 {
769 return ilObjUser::_lookup($a_user_id, "client_ip");
770 }

References _lookup().

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

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

◆ _lookupDesktopItems()

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

get all desktop items of user and specified type

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

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

3266 {
3267 global $ilUser, $rbacsystem, $tree, $ilDB;
3268
3269 if ($a_types == "")
3270 {
3271 $is_nested_set = ($tree->getTreeImplementation() instanceof ilNestedSetTree);
3272
3273 $item_set = $ilDB->queryF("SELECT obj.obj_id, obj.description, oref.ref_id, obj.title, obj.type ".
3274 " FROM desktop_item it, object_reference oref ".
3275 ", object_data obj".
3276 " WHERE ".
3277 "it.item_id = oref.ref_id AND ".
3278 "oref.obj_id = obj.obj_id AND ".
3279 "it.user_id = %s", array("integer"), array($user_id));
3280 $items = $all_parent_path = array();
3281 while ($item_rec = $ilDB->fetchAssoc($item_set))
3282 {
3283 if ($tree->isInTree($item_rec["ref_id"])
3284 && $item_rec["type"] != "rolf"
3285 && $item_rec["type"] != "itgr") // due to bug 11508
3286 {
3287 $parent_ref = $tree->getParentId($item_rec["ref_id"]);
3288
3289 if(!isset($all_parent_path[$parent_ref]))
3290 {
3291 // #15746
3292 //if($is_nested_set)
3293 //{
3294 // $par_left = $tree->getLeftValue($parent_ref);
3295 // $all_parent_path[$parent_ref] = sprintf("%010d", $par_left);
3296 //}
3297 //else
3298 //{
3299 $node = $tree->getNodeData($parent_ref);
3300 $all_parent_path[$parent_ref] = $node["title"];
3301 //}
3302 }
3303
3304 $parent_path = $all_parent_path[$parent_ref];
3305
3306 $title = ilObject::_lookupTitle($item_rec["obj_id"]);
3307 $desc = ilObject::_lookupDescription($item_rec["obj_id"]);
3308 $items[$parent_path.$title.$item_rec["ref_id"]] =
3309 array("ref_id" => $item_rec["ref_id"],
3310 "obj_id" => $item_rec["obj_id"],
3311 "type" => $item_rec["type"],
3312 "title" => $title,
3313 "description" => $desc,
3314 "parent_ref" => $parent_ref);
3315 }
3316 }
3317 ksort($items);
3318 }
3319 else
3320 {
3321 // due to bug 11508
3322 if (!is_array($a_types))
3323 {
3324 $a_types = array($a_types);
3325 }
3326 $items = array();
3327 $foundsurveys = array();
3328 foreach($a_types as $a_type)
3329 {
3330 if ($a_type == "itgr")
3331 {
3332 continue;
3333 }
3334 $item_set = $ilDB->queryF("SELECT obj.obj_id, obj.description, oref.ref_id, obj.title FROM desktop_item it, object_reference oref ".
3335 ", object_data obj WHERE ".
3336 "it.item_id = oref.ref_id AND ".
3337 "oref.obj_id = obj.obj_id AND ".
3338 "it.type = %s AND ".
3339 "it.user_id = %s ".
3340 "ORDER BY title",
3341 array("text", "integer"),
3342 array($a_type, $user_id));
3343
3344 while ($item_rec = $ilDB->fetchAssoc($item_set))
3345 {
3346 $title = ilObject::_lookupTitle($item_rec["obj_id"]);
3347 $desc = ilObject::_lookupDescription($item_rec["obj_id"]);
3348 $items[$title.$a_type.$item_rec["ref_id"]] =
3349 array("ref_id" => $item_rec["ref_id"],
3350 "obj_id" => $item_rec["obj_id"], "type" => $a_type,
3351 "title" => $title, "description" => $desc);
3352 }
3353
3354 }
3355 ksort($items);
3356 }
3357
3358 return $items;
3359 }
Base class for nested set path based trees.
static _lookupTitle($a_id)
lookup object title
static _lookupDescription($a_id)
lookup object description
global $ilUser
Definition: imgupload.php:15

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

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

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

◆ _lookupEmail()

◆ _lookupExternalAccount()

ilObjUser::_lookupExternalAccount (   $a_user_id)

lookup external account for login and authmethod

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

817 {
818 return ilObjUser::_lookup($a_user_id, "ext_account");
819 }

References _lookup().

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

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

◆ _lookupFeedHash()

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

Lookup news feed hash for user.

If hash does not exist, create one.

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

4392 {
4393 global $ilDB;
4394
4395 if ($a_user_id > 0)
4396 {
4397 $set = $ilDB->queryF("SELECT feed_hash from usr_data WHERE usr_id = %s",
4398 array("integer"), array($a_user_id));
4399 if ($rec = $ilDB->fetchAssoc($set))
4400 {
4401 if (strlen($rec["feed_hash"]) == 32)
4402 {
4403 return $rec["feed_hash"];
4404 }
4405 else if($a_create)
4406 {
4407 $hash = md5(rand(1,9999999) + str_replace(" ", "", (string) microtime()));
4408 $ilDB->manipulateF("UPDATE usr_data SET feed_hash = %s".
4409 " WHERE usr_id = %s",
4410 array("text", "integer"),
4411 array($hash, $a_user_id));
4412 return $hash;
4413 }
4414 }
4415 }
4416
4417 return false;
4418 }

References $ilDB.

Referenced by ilUserFeedWriter\ilUserFeedWriter().

+ Here is the caller graph for this function:

◆ _lookupFields()

ilObjUser::_lookupFields (   $a_user_id)

lookup fields (deprecated; use more specific methods instead)

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

796 {
797 global $ilDB;
798
799 $res = $ilDB->queryF("SELECT * FROM usr_data WHERE usr_id = %s",
800 array("integer"), array($a_user_id));
801 $user_rec = $ilDB->fetchAssoc($res);
802 return $user_rec;
803 }

References $ilDB, and $res.

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

+ Here is the caller graph for this function:

◆ _lookupFullname()

ilObjUser::_lookupFullname (   $a_user_id)

Lookup Full Name.

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

712 {
713 global $ilDB;
714
715 $set = $ilDB->queryF("SELECT title, firstname, lastname FROM usr_data WHERE usr_id = %s",
716 array("integer"), array($a_user_id));
717
718 if ($rec = $ilDB->fetchAssoc($set))
719 {
720 if ($rec["title"])
721 {
722 $fullname = $rec["title"]." ";
723 }
724 if ($rec["firstname"])
725 {
726 $fullname .= $rec["firstname"]." ";
727 }
728 if ($rec["lastname"])
729 {
730 $fullname .= $rec["lastname"];
731 }
732 }
733 return $fullname;
734 }

References $fullname, and $ilDB.

Referenced by ilExAssignment\addTeamMember(), ilCalendarAppointmentGUI\book(), ilCalendarAppointmentGUI\cancelBooking(), ilRbacLogTableGUI\fillRow(), ilExParticipantTableGUI\fillRow(), ilLPTableBaseGUI\getExportMeta(), ilCalendarAppointmentPanelGUI\getHTML(), ilCalendarBlockGUI\getHTML(), ilExAssignmentTeamLogTableGUI\getItems(), ilExAssignmentGUI\getOverviewBody(), ilExAssignment\getTeamId(), ilCalendarBlockGUI\ilCalendarBlockGUI(), ilSCORMTrackingItemPerUserTableGUI\initTable(), ilSCORMTrackingItemsPerUserTableGUI\initTable(), ilBookingEntry\lookupManagedBookingsForObject(), ilSCORMTrackingItemsScoTableGUI\parse(), ilConsultationHoursTableGUI\parse(), ilExAssignment\removeTeamMember(), ilCalendarMailNotification\send(), ilConsultationHoursGUI\sendInfoAboutUnassignedUsers(), ilObjDataCollection\sendNotification(), ilWikiUtil\sendNotification(), ilObjSurvey\sendTutorNotification(), and ilObjSurvey\sentReminder().

+ Here is the caller graph for this function:

◆ _lookupGender()

static ilObjUser::_lookupGender (   $a_user_id)
static

Lookup gender.

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

757 {
758 return ilObjUser::_lookup($a_user_id, "gender");
759 }

References _lookup().

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

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

◆ _lookupId()

static ilObjUser::_lookupId (   $a_user_str)
static

lookup id by login

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

825 {
826 global $ilDB;
827
828 $res = $ilDB->queryF("SELECT usr_id FROM usr_data WHERE login = %s",
829 array("text"), array($a_user_str));
830 $user_rec = $ilDB->fetchAssoc($res);
831 return $user_rec["usr_id"];
832 }

References $ilDB, and $res.

Referenced by ilDiskQuotaSummaryNotification\__construct(), ilMail\__getCountRecipient(), ilMail\__getEmailRecipients(), ilObjUserGUI\_goto(), ilShopUtils\_sendNotificationToVATAdministration(), ilSoapObjectAdministration\addObject(), ilOrgUnitStaffGUI\addOtherRoles(), ilOrgUnitStaffGUI\addStaff(), ilObjBlogGUI\addUserFromAutoComplete(), ilRepositorySearchGUI\addUserFromAutoComplete(), ilObjExerciseGUI\addUserFromAutoCompleteObject(), ilSkillProfileGUI\assignUser(), ilOrgUnitSimpleUserImport\buildUserId(), ilChatroomInviteUsersToPrivateRoomTask\byLogin(), ilPermission2GUI\changeOwner(), ilMailAddressbookGUI\checkInput(), checkUserId(), ilOpenIdAttributeToUser\create(), ilAuthBase\failedLoginObserver(), ilMail\formatNamesForOutput(), ilObjectPermissionStatusGUI\getUser(), getUserIdByLogin(), ilMail\getUserIds(), ilSessionControl\handleLoginEvent(), ilChatroom\inviteUserToPrivateRoomByLogin(), ilAuthContainerMDB2\loginObserver(), ilAuthContainerECS\loginObserver(), ilStartUpGUI\migrateAccount(), ilSoapRBACAdministration\parseUserID(), ilStartUpGUI\processCode(), ilECSCmsCourseMemberCommandQueueHandler\refreshAssignmentStatus(), ilDataCollectionRecordEditGUI\save(), ilObjSurveyGUI\savePropertiesObject(), ilDiskQuotaSummaryNotification\send(), ilRegistrationSettings\setApproveRecipientLogins(), ilObjDiskQuotaSettings\setSummaryRecipients(), ilMailSearchGUI\showResults(), ilObjUserTest\testCreateSetLookupDelete(), ilLDAPAttributeToUser\usersToXML(), ilRegistrationSettings\validate(), and ilUserImportParser\verifyEndTag().

+ Here is the caller graph for this function:

◆ _lookupIm()

ilObjUser::_lookupIm (   $a_user_id,
  $a_type 
)

Lookup IM.

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

740 {
741 return ilObjUser::_lookup($a_user_id, "im_".$a_type);
742 }

References _lookup().

Referenced by ilUsersOnlineBlockGUI\fillRow().

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

◆ _lookupLanguage()

static ilObjUser::_lookupLanguage (   $a_usr_id)
static

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

2031 {
2032 global $ilDB;
2033
2034 $q = "SELECT value FROM usr_pref WHERE usr_id= ".
2035 $ilDB->quote($a_usr_id, "integer")." AND keyword = ".
2036 $ilDB->quote('language', "text");
2037 $r = $ilDB->query($q);
2038
2039 while($row = $ilDB->fetchAssoc($r))
2040 {
2041 return $row['value'];
2042 }
2043 return 'en';
2044 }

References $ilDB, and $row.

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

+ Here is the caller graph for this function:

◆ _lookupLastLogin()

ilObjUser::_lookupLastLogin (   $a_user_id)

lookup last login

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

838 {
839 return ilObjUser::_lookup($a_user_id, "last_login");
840 }

References _lookup().

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

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

◆ _lookupLogin()

ilObjUser::_lookupLogin (   $a_user_id)

lookup login

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

809 {
810 return ilObjUser::_lookup($a_user_id, "login");
811 }

References _lookup().

Referenced by ilCourseXMLParser\__parseId(), ilRegistrationSettings\__read(), ilPaymentStatisticGUI\addStatisticWorksheet(), ilObjPaymentSettingsGUI\addStatisticWorksheet(), ilMailSearchCoursesGUI\adoptMembers(), ilMailSearchGroupsGUI\adoptMembers(), ilObjSessionGUI\eventsListObject(), ilSessionOverviewGUI\exportCSV(), ilMilestoneResponsiblesTableGUI\fillRow(), ilPageHistoryTableGUI\fillRow(), ilAttendanceList\getHTML(), ilDAVServer\getLogin(), getLoginByUserId(), ilConsultationHourAppointments\getManagedUsers(), ilConsultationHourAppointments\getManager(), ilNoteGUI\getNoteListHTML(), ilTestServiceGUI\getResultsHeadUserAndPass(), ilTestServiceGUI\getResultsUserdata(), ilObjSurvey\getUserDataFromActiveId(), ilObjForumGUI\getUserNotificationTableData(), ilObjUserGUI\getValues(), ilCalendarAppointmentGUI\initForm(), ilSessionOverviewGUI\listSessions(), ilAuthContainerSOAP\loginObserver(), ilMailSearchCoursesGUI\mailMembers(), ilMailSearchGroupsGUI\mailMembers(), ilPermission2GUI\owner(), ilSessionParticipantsTableGUI\parse(), ilCalendarSharedUserListTableGUI\parse(), ilObjCourseGUI\readMemberData(), ilObjGroupGUI\readMemberData(), ilCalendarEntry\readResponsibleUsers(), ilObjExerciseGUI\redirectFeedbackMailObject(), ilMailSummaryNotification\send(), ilForum\sendForumNotifications(), ilMailNotification\sendMail(), ilMembershipCronNotifications\sendMail(), ilForumCronNotification\sendMails(), ilObjContentObjectGUI\sendMailToBlockedUsers(), ilMembershipGUI\sendMailToSelectedUsers(), ilObjCourseGUI\sendMailToSelectedUsersObject(), ilObjGroupGUI\sendMailToSelectedUsersObject(), ilObjDataCollection\sendNotification(), ilWikiUtil\sendNotification(), ilForum\sendPostActivationNotification(), ilForum\sendThreadNotifications(), ilObjSurvey\sendTutorNotification(), ilObjSurvey\sentReminder(), ilPaymentCouponGUI\showCoupons(), ilMailSearchCoursesGUI\showMembers(), ilMailSearchGUI\showResults(), ilPaymentStatisticGUI\showStatistics(), ilMailFolderGUI\showUser(), ilObjPaymentSettingsGUI\statisticObject(), ilObjUserTest\testCreateSetLookupDelete(), updateLogin(), and ilUserImportParser\verifyEndTag().

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

779 {
780 global $ilDB;
781
782 $res = $ilDB->queryF("SELECT firstname, lastname, title, login FROM usr_data WHERE usr_id = %s",
783 array("integer"), array($a_user_id));
784 $user_rec = $ilDB->fetchAssoc($res);
785 return array("user_id" => $a_user_id,
786 "firstname" => $user_rec["firstname"],
787 "lastname" => $user_rec["lastname"],
788 "title" => $user_rec["title"],
789 "login" => $user_rec["login"]);
790 }

References $ilDB, and $res.

Referenced by ilExGradesTableGUI\__construct(), ilExParticipantTableGUI\__construct(), ilGroupXMLParser\__parseId(), ilObjTestAccess\_getParticipantData(), ilObjPaymentSettingsGUI\addStatisticWorksheet(), ilMailSearchCoursesGUI\adoptMembers(), ilMailSearchGroupsGUI\adoptMembers(), ilObjCourseGUI\confirmAssignFromWaitingListObject(), ilObjGroupGUI\confirmAssignFromWaitingListObject(), ilObjSessionGUI\confirmAssignFromWaitingListObject(), ilObjCourseGUI\confirmAssignSubscribersObject(), ilObjGroupGUI\confirmAssignSubscribersObject(), ilObjSessionGUI\confirmAssignSubscribersObject(), ilObjCourseGUI\confirmRefuseFromListObject(), ilObjGroupGUI\confirmRefuseFromListObject(), ilObjSessionGUI\confirmRefuseFromListObject(), ilObjCourseGUI\confirmRefuseSubscribersObject(), ilObjGroupGUI\confirmRefuseSubscribersObject(), ilObjSessionGUI\confirmRefuseSubscribersObject(), ilOrgUnitStaffGUI\confirmRemoveUser(), ilSkillProfileGUI\confirmUserRemoval(), ilObjCourseGUI\deleteMembersObject(), ilObjTestGUI\deleteSingleUserResultsObject(), ilLocalUserGUI\deleteUsers(), ilObjCategoryGUI\deleteUsersObject(), ilExAssignment\deliverReturnedFiles(), ilExAssignment\downloadAllDeliveredFiles(), ilObjBlogGUI\downloadExcSubFile(), ilObjPortfolioGUI\downloadExcSubFile(), ilExAssignment\downloadMultipleFiles(), ilExAssignment\downloadSelectedFiles(), ilObjSessionGUI\eventsListObject(), ilSessionOverviewGUI\exportCSV(), ilObjExercise\exportGradesExcel(), ilObjAssessmentFolderGUI\exportLogObject(), ilFileVersionTableGUI\fillRow(), ilRbacLogTableGUI\fillRow(), ilCalendarInboxSharedTableGUI\fillRow(), ilPageHistoryTableGUI\fillRow(), ilAssessmentFolderLogTableGUI\fillRow(), ilObjSurvey\getAppraiseesData(), ilSkillProfile\getAssignedUsers(), ilLMTracker\getBlockedUsersInformation(), ilAttendanceList\getHTML(), ilCourseParticipantsGroupsTableGUI\getItems(), ilBookingReservation\getListByDate(), ilExAssignment\getMultiFeedbackFiles(), ilPageObject\getPageContributors(), ilPageObject\getParentObjectContributors(), ilMilestoneResponsiblesTableGUI\getParticipantsAndResponsibles(), ilObjSurvey\getRatersData(), ilMail\getSalutation(), ilDataCollectionRecord\getStandardField(), ilObjForumGUI\getUserNotificationTableData(), ilWorkspaceShareTableGUI\importData(), ilWorkspaceShareTableGUI\initFilter(), ilObjectCustomUserFieldsGUI\initMemberForm(), ilObjSurveyGUI\initPropertiesForm(), ilSessionOverviewGUI\listSessions(), ilAuthContainerCalendarToken\loginObserver(), ilTestEvaluationGUI\outParticipantsResultsOverview(), ilGroupParticipantsTableGUI\parse(), ilCourseParticipantsTableGUI\parse(), ilSessionParticipantsTableGUI\parse(), ilCalendarSharedListTableGUI\parse(), ilCalendarSharedUserListTableGUI\parse(), ilConsultationHoursTableGUI\parse(), ilObjCourseGUI\readMemberData(), ilObjGroupGUI\readMemberData(), ilCalendarEntry\readResponsibleUsers(), ilSubscriberTableGUI\readSubscriberData(), ilWaitingListTableGUI\readUserData(), ilObjPortfolioBaseGUI\renderFullscreenHeader(), ilObjBlogGUI\renderFullscreenHeader(), ilTestScoringGUI\saveManScoringParticipantScreen(), ilObjExerciseGUI\saveStatusObject(), ilExAssignment\sendMultiFeedbackStructureFile(), ilMailSearchCoursesGUI\showMembers(), ilObjExerciseGUI\showParticipantObject(), ilMailSearchGUI\showResults(), ilCourseContentGUI\showUserTimings(), ilObjPaymentSettingsGUI\statisticObject(), ilObjUserTest\testCreateSetLookupDelete(), ilObjTest\userLookupFullName(), and ilMailNotification\userToString().

+ Here is the caller graph for this function:

◆ _lookupPref()

ilObjUser::_lookupPref (   $a_usr_id,
  $a_keyword 
)

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

1254 {
1255 global $ilDB;
1256
1257 $query = "SELECT * FROM usr_pref WHERE usr_id = ".$ilDB->quote($a_usr_id, "integer")." ".
1258 "AND keyword = ".$ilDB->quote($a_keyword, "text");
1259 $res = $ilDB->query($query);
1260
1261 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
1262 {
1263 return $row->value;
1264 }
1265 return false;
1266 }

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by _getFeedPass(), ilNewsItem\_getNewsItemsOfUser(), ilMailSearchCoursesGUI\adoptMembers(), ilMailSearchGroupsGUI\adoptMembers(), ilWebAccessChecker\checkAccessUserImage(), ilUsersOnlineBlockGUI\fillRow(), ilMail\formatNamesForOutput(), ilUserUtil\getProfileLink(), ilUsersOnlineBlockGUI\getUsers(), ilMailSearchCoursesGUI\showMembers(), ilMailSearchGroupsGUI\showMembers(), ilMailSearchGUI\showResults(), and ilObjUserTest\testCreateSetLookupDelete().

+ Here is the caller graph for this function:

◆ _moveUsersToStyle()

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

skins and styles

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

3028 {
3029 global $ilDB;
3030
3031 $q = "SELECT up1.usr_id usr_id FROM usr_pref up1, usr_pref up2 ".
3032 " WHERE up1.keyword= ".$ilDB->quote("style", "text").
3033 " AND up1.value= ".$ilDB->quote($a_from_style, "text").
3034 " AND up2.keyword= ".$ilDB->quote("skin", "text").
3035 " AND up2.value= ".$ilDB->quote($a_from_skin, "text").
3036 " AND up1.usr_id = up2.usr_id ";
3037
3038 $usr_set = $ilDB->query($q);
3039
3040 while ($usr_rec = $ilDB->fetchAssoc($usr_set))
3041 {
3042 self::_writePref($usr_rec["usr_id"], "skin", $a_to_skin);
3043 self::_writePref($usr_rec["usr_id"], "style", $a_to_style);
3044 }
3045 }
static _writePref($a_usr_id, $a_keyword, $a_value)

References $ilDB, and _writePref().

Referenced by ilObjStyleSettingsGUI\moveUserStylesObject(), and ilObjUserTest\testMiscellaneous().

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

◆ _readUsersProfileData()

static ilObjUser::_readUsersProfileData (   $a_user_ids)
static

STATIC METHOD get user data of selected users.

Parameters
arraydesired user ids
Returns
array of user data

@access public

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

2852 {
2853 global $ilDB;
2854 $res = $ilDB->query("SELECT * FROM usr_data WHERE ".
2855 $ilDB->in("usr_id", $a_user_ids, false, "integer"));
2856 while ($row = $ilDB->fetchAssoc($res))
2857 {
2858 $user_data["$row[usr_id]"] = $row;
2859 }
2860 return $user_data ? $user_data : array();
2861 }

References $ilDB, $res, and $row.

Referenced by ilMemberExport\fetchUsers(), ilObjPaymentSettingsGUI\saveCustomerObject(), and ilObjUserTest\testCreateSetLookupDelete().

+ Here is the caller graph for this function:

◆ _removeItemFromDesktops()

static ilObjUser::_removeItemFromDesktops (   $a_id)
static

removes object from all user's desktops @access public

Parameters
integerref_id
Returns
array user_ids of all affected users

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

3150 {
3151 global $ilDB;
3152
3153 $r = $ilDB->queryF("SELECT user_id FROM desktop_item WHERE item_id = %s",
3154 array("integer"), array($a_id));
3155
3156 $users = array();
3157
3158 while ($row = $ilDB->fetchObject($r))
3159 {
3160 $users[] = $row->user_id;
3161 } // while
3162
3163 if (count($users) > 0)
3164 {
3165 $ilDB->manipulateF("DELETE FROM desktop_item WHERE item_id = %s",
3166 array("integer"), array($a_id));
3167 }
3168
3169 return $users;
3170 }

References $ilDB, and $row.

Referenced by ilUtil\removeItemFromDesktops().

+ Here is the caller graph for this function:

◆ _resetLoginAttempts()

static ilObjUser::_resetLoginAttempts (   $a_usr_id)
static

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

4728 {
4729 global $ilDB;
4730
4731 $query = "UPDATE usr_data SET login_attempts = 0 WHERE usr_id = %s";
4732 $affected = $ilDB->manipulateF( $query, array('integer'), array($a_usr_id) );
4733
4734 if($affected) return true;
4735 else return false;
4736 }

References $ilDB, and $query.

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

+ Here is the caller graph for this function:

◆ _setFeedPass()

ilObjUser::_setFeedPass (   $a_user_id,
  $a_password 
)

Set news feed password for user.

Parameters
integeruser_id
stringnew password

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

4442 {
4443 global $ilDB;
4444
4445 self::_writePref($a_user_id, "priv_feed_pass",
4446 ($a_password=="") ? "" : md5($a_password));
4447 }

References $ilDB, and _writePref().

+ Here is the call graph for this function:

◆ _setUserInactive()

static ilObjUser::_setUserInactive (   $a_usr_id)
static

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

4762 {
4763 global $ilDB;
4764
4765 $query = "UPDATE usr_data SET active = 0, inactivation_date = %s WHERE usr_id = %s";
4766 $affected = $ilDB->manipulateF( $query, array('timestamp', 'integer'), array(ilUtil::now(), $a_usr_id) );
4767
4768 if($affected) return true;
4769 else return false;
4770 }
static now()
Return current timestamp in Y-m-d H:i:s format.

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

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

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

◆ _toggleActiveStatusOfUsers()

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

Toggle active status of users.

@access public

Parameters

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

3713 {
3714 global $ilDB;
3715
3716 if(!is_array($a_usr_ids))
3717 {
3718 return false;
3719 }
3720
3721
3722 if( $a_status )
3723 {
3724 $q = "UPDATE usr_data SET active = 1, inactivation_date = NULL WHERE ".
3725 $ilDB->in("usr_id", $a_usr_ids, false, "integer");
3726 $ilDB->manipulate($q);
3727 }
3728 else
3729 {
3730 $usrId_IN_usrIds = $ilDB->in("usr_id", $a_usr_ids, false, "integer");
3731
3732 $q = "UPDATE usr_data SET active = 0 WHERE $usrId_IN_usrIds";
3733 $ilDB->manipulate($q);
3734
3735 $queryString = "
3736 UPDATE usr_data
3737 SET inactivation_date = %s
3738 WHERE inactivation_date IS NULL
3739 AND $usrId_IN_usrIds
3740 ";
3741 $ilDB->manipulateF($queryString, array('timestamp'), array(ilUtil::now()));
3742 }
3743
3744 return true;
3745 }

References $ilDB, and ilUtil\now().

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

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

◆ _updateLastLogin()

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

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

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

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

5172 {
5173 if($a_last_login !== null) $last_login = $a_last_login;
5174 else $last_login = date('Y-m-d H:i:s');
5175
5176 global $ilDB;
5177
5178 $query = "UPDATE usr_data SET last_login = %s WHERE usr_id = %s";
5179 $affected = $ilDB->manipulateF( $query, array('timestamp', 'integer'), array($last_login, $a_usr_id) );
5180
5181 if($affected) return $last_login;
5182 else return false;
5183 }

References $ilDB, and $query.

Referenced by ShibAuth\login().

+ Here is the caller graph for this function:

◆ _uploadPersonalPicture()

ilObjUser::_uploadPersonalPicture (   $tmp_file,
  $obj_id 
)

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

3877 {
3878 $webspace_dir = ilUtil::getWebspaceDir();
3879 $image_dir = $webspace_dir."/usr_images";
3880 $store_file = "usr_".$obj_id."."."jpg";
3881 $target_file = $image_dir."/$store_file";
3882
3883 chmod($tmp_file, 0770);
3884
3885 // take quality 100 to avoid jpeg artefacts when uploading jpeg files
3886 // taking only frame [0] to avoid problems with animated gifs
3887 $show_file = "$image_dir/usr_".$obj_id.".jpg";
3888 $thumb_file = "$image_dir/usr_".$obj_id."_small.jpg";
3889 $xthumb_file = "$image_dir/usr_".$obj_id."_xsmall.jpg";
3890 $xxthumb_file = "$image_dir/usr_".$obj_id."_xxsmall.jpg";
3891
3892 ilUtil::execConvert($tmp_file . "[0] -geometry 200x200 -quality 100 JPEG:".$show_file);
3893 ilUtil::execConvert($tmp_file . "[0] -geometry 100x100 -quality 100 JPEG:".$thumb_file);
3894 ilUtil::execConvert($tmp_file . "[0] -geometry 75x75 -quality 100 JPEG:".$xthumb_file);
3895 ilUtil::execConvert($tmp_file . "[0] -geometry 30x30 -quality 100 JPEG:".$xxthumb_file);
3896
3897 // store filename
3898 self::_writePref($obj_id, "profile_image", $store_file);
3899
3900 return TRUE;
3901 }
static getWebspaceDir($mode="filesystem")
get webspace directory
static execConvert($args)
execute convert command

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

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

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

◆ _verifyRegistrationHash()

static ilObjUser::_verifyRegistrationHash (   $a_hash)
static

Verifies a registration hash.

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

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

5047 {
5048 global $ilDB;
5049
5050 $res = $ilDB->queryf('
5051 SELECT usr_id, create_date FROM usr_data
5052 WHERE reg_hash = %s',
5053 array('text'),
5054 array($a_hash));
5055 while($row = $ilDB->fetchAssoc($res))
5056 {
5057 require_once 'Services/Registration/classes/class.ilRegistrationSettings.php';
5058 $oRegSettigs = new ilRegistrationSettings();
5059
5060 if((int)$oRegSettigs->getRegistrationHashLifetime() != 0 &&
5061 time() - (int)$oRegSettigs->getRegistrationHashLifetime() > strtotime($row['create_date']))
5062 {
5063 require_once 'Services/Registration/exceptions/class.ilRegConfirmationLinkExpiredException.php';
5064 throw new ilRegConfirmationLinkExpiredException('reg_confirmation_hash_life_time_expired', $row['usr_id']);
5065 }
5066
5067 $ilDB->manipulateF('
5068 UPDATE usr_data
5069 SET reg_hash = %s
5070 WHERE usr_id = %s',
5071 array('text', 'integer'),
5072 array('', (int)$row['usr_id'])
5073 );
5074
5075 return (int)$row['usr_id'];
5076 }
5077
5078 require_once 'Services/Registration/exceptions/class.ilRegistrationHashNotFoundException.php';
5079 throw new ilRegistrationHashNotFoundException('reg_confirmation_hash_not_found');
5080 }
Class for user related exception handling in ILIAS.
Class for user related exception handling in ILIAS.
Class ilObjAuthSettingsGUI.

References $ilDB, $res, and $row.

Referenced by ilStartUpGUI\confirmRegistration().

+ Here is the caller graph for this function:

◆ _writeAuthMode()

ilObjUser::_writeAuthMode (   $a_usr_id,
  $a_auth_mode 
)

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

2057 {
2058 global $ilDB;
2059
2060 $ilDB->manipulateF("UPDATE usr_data ".
2061 " SET auth_mode = %s WHERE usr_id = %s",
2062 array("text", "integer"),
2063 array($a_auth_mode, $a_usr_id));
2064 }

References $ilDB.

Referenced by ilAuthContainerSOAP\loginObserver(), and ilObjUserTest\testAuthAndEmailMethods().

+ Here is the caller graph for this function:

◆ _writeExternalAccount()

ilObjUser::_writeExternalAccount (   $a_usr_id,
  $a_ext_id 
)

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

2047 {
2048 global $ilDB;
2049
2050 $ilDB->manipulateF("UPDATE usr_data ".
2051 " SET ext_account = %s WHERE usr_id = %s",
2052 array("text", "integer"),
2053 array($a_ext_id, $a_usr_id));
2054 }

References $ilDB.

Referenced by ilAuthContainerSOAP\loginObserver(), and ilObjUserTest\testAuthAndEmailMethods().

+ Here is the caller graph for this function:

◆ _writeHistory()

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

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

4796 {
4797 global $ilDB;
4798
4799 $timestamp = time();
4800
4801 $res = $ilDB->queryF('SELECT * FROM loginname_history WHERE usr_id = %s AND login = %s AND history_date = %s',
4802 array('integer', 'text', 'integer'),
4803 array($a_usr_id, $a_login, $timestamp));
4804
4805 if( $ilDB->numRows($res) == 0 )
4806 {
4807 $ilDB->manipulateF('
4808 INSERT INTO loginname_history
4809 (usr_id, login, history_date)
4810 VALUES (%s, %s, %s)',
4811 array('integer', 'text', 'integer'),
4812 array($a_usr_id, $a_login, $timestamp));
4813 }
4814
4815 return true;
4816 }
foreach($mandatory_scripts as $file) $timestamp
Definition: buildRTE.php:81

References $ilDB, $res, and $timestamp.

Referenced by updateLogin().

+ Here is the caller graph for this function:

◆ _writePref()

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

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

1123 {
1124 global $ilDB;
1125 $ilDB->replace("usr_pref",
1126 array(
1127 "usr_id" => array("integer", $a_usr_id),
1128 "keyword" => array("text", $a_keyword),
1129 ),
1130 array(
1131 "value" => array("text",$a_value)
1132 )
1133 );
1134
1135 /*
1136 self::_deletePref($a_usr_id, $a_keyword);
1137 if(strlen($a_value))
1138 {
1139 $ilDB->manipulateF(
1140 'INSERT INTO usr_pref (usr_id, keyword, value) VALUES (%s, %s, %s)',
1141 array('integer', 'text', 'text'),
1142 array($a_usr_id, $a_keyword, $a_value)
1143 );
1144 }*/
1145 }

References $ilDB.

Referenced by _moveUsersToStyle(), _setFeedPass(), _uploadPersonalPicture(), ilOpenIdAttributeToUser\create(), writePref(), and writePrefs().

+ Here is the caller graph for this function:

◆ activateDeletionFlag()

ilObjUser::activateDeletionFlag ( )

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

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

References writePref().

+ Here is the call graph for this function:

◆ addDesktopItem()

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

add an item to user's personal desktop

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

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

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

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

+ Here is the call graph for this function:

◆ addObjectToClipboard()

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

add an item to user's personal clipboard

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

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

3376 {
3377 global $ilDB;
3378
3379 if ($a_time == 0)
3380 {
3381 $a_time = date("Y-m-d H:i:s", time());
3382 }
3383
3384 $item_set = $ilDB->queryF("SELECT * FROM personal_clipboard WHERE ".
3385 "parent = %s AND item_id = %s AND type = %s AND user_id = %s",
3386 array("integer", "integer", "text", "integer"),
3387 array(0, $a_item_id, $a_type, $this->getId()));
3388
3389 // only insert if item is not already in clipboard
3390 if (!$d = $item_set->fetchRow())
3391 {
3392 $ilDB->manipulateF("INSERT INTO personal_clipboard ".
3393 "(item_id, type, user_id, title, parent, insert_time, order_nr) VALUES ".
3394 " (%s,%s,%s,%s,%s,%s,%s)",
3395 array("integer", "text", "integer", "text", "integer", "timestamp", "integer"),
3396 array($a_item_id, $a_type, $this->getId(), $a_title, (int) $a_parent, $a_time, (int) $a_order_nr));
3397 }
3398 else
3399 {
3400 $ilDB->manipulateF("UPDATE personal_clipboard SET insert_time = %s ".
3401 "WHERE user_id = %s AND item_id = %s AND type = %s AND parent = 0",
3402 array("timestamp", "integer", "integer", "text"),
3403 array($a_time, $this->getId(), $a_item_id, $a_type));
3404 }
3405 }

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

+ Here is the call graph for this function:

◆ addToPCClipboard()

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

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

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

3411 {
3412 global $ilDB;
3413 if ($a_time == 0)
3414 {
3415 $a_time = date("Y-m-d H:i:s", time());
3416 }
3417 $ilDB->insert("personal_pc_clipboard", array(
3418 "user_id" => array("integer", $this->getId()),
3419 "content" => array("clob", $a_content),
3420 "insert_time" => array("timestamp", $a_time),
3421 "order_nr" => array("integer", $a_nr)
3422 ));
3423 }

References $ilDB, and ilObject\getId().

+ Here is the call graph for this function:

◆ addUserDefinedFieldEntry()

ilObjUser::addUserDefinedFieldEntry ( )

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

4163 {
4164 global $ilDB;
4165
4166// not needed. no entry in udf_text/udf_clob means no value
4167
4168/* $query = "INSERT INTO udf_data (usr_id ) ".
4169 "VALUES( ".
4170 $ilDB->quote($this->getId(),'integer').
4171 ")";
4172 $res = $ilDB->manipulate($query);
4173*/
4174 return true;
4175 }

References $ilDB.

◆ assignData()

ilObjUser::assignData (   $a_data)

loads a record "user" from array @access public

Parameters
arrayuserdata

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

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

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

Referenced by read().

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

◆ buildTextFromArray()

ilObjUser::buildTextFromArray (   $a_attr)
protected

Convert multi-text values to plain text.

Parameters
string$a_attr
Returns
string

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

5619 {
5620 $current = $this->$a_attr;
5621 if(is_array($current) && sizeof($current))
5622 {
5623 return implode(", ", $current);
5624 }
5625 }

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

+ Here is the caller graph for this function:

◆ checkTimeLimit()

ilObjUser::checkTimeLimit ( )

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

2335 {
2336 if($this->getTimeLimitUnlimited())
2337 {
2338 return true;
2339 }
2340 if($this->getTimeLimitFrom() < time() and $this->getTimeLimitUntil() > time())
2341 {
2342 return true;
2343 }
2344 return false;
2345 }

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

+ Here is the call graph for this function:

◆ checkUserId()

ilObjUser::checkUserId ( )

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

2558 {
2559 global $ilAuth, $ilSetting;
2560
2563 if ($id > 0)
2564 {
2565 return $id;
2566 }
2567 return false;
2568 }
$login
all user related data in single vars @access public
static getLoginFromAuth()
Gets the username from $ilAuth, and converts it into an ILIAS login name.
static _lookupId($a_user_str)
lookup id by login

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

+ Here is the call graph for this function:

◆ clipboardDeleteAll()

ilObjUser::clipboardDeleteAll ( )

Delete objects of type for user.

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

3485 {
3486 global $ilDB;
3487
3488 $ilDB->manipulateF("DELETE FROM personal_clipboard WHERE ".
3489 "user_id = %s", array("integer"), array($this->getId()));
3490 }

References $ilDB, and ilObject\getId().

Referenced by delete().

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

◆ clipboardDeleteObjectsOfType()

ilObjUser::clipboardDeleteObjectsOfType (   $a_type)

Delete objects of type for user.

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

3472 {
3473 global $ilDB;
3474
3475 $ilDB->manipulateF("DELETE FROM personal_clipboard WHERE ".
3476 "type = %s AND user_id = %s",
3477 array("text", "integer"),
3478 array($a_type, $this->getId()));
3479 }

References $ilDB, and ilObject\getId().

+ Here is the call graph for this function:

◆ clipboardHasObjectsOfType()

ilObjUser::clipboardHasObjectsOfType (   $a_type)

Check whether clipboard has objects of a certain type.

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

3453 {
3454 global $ilDB;
3455
3456 $set = $ilDB->queryF("SELECT * FROM personal_clipboard WHERE ".
3457 "parent = %s AND type = %s AND user_id = %s",
3458 array("integer", "text", "integer"),
3459 array(0, $a_type, $this->getId()));
3460 if ($rec = $ilDB->fetchAssoc($set))
3461 {
3462 return true;
3463 }
3464
3465 return false;
3466 }

References $ilDB, and ilObject\getId().

+ Here is the call graph for this function:

◆ copyProfilePicturesToDirectory()

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

Get profile picture direcotory.

Parameters

return

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

4006 {
4007 $a_dir = trim(str_replace("..", "", $a_dir));
4008 if ($a_dir == "" || !is_dir($a_dir))
4009 {
4010 return;
4011 }
4012
4013 $webspace_dir = ilUtil::getWebspaceDir();
4014 $image_dir = $webspace_dir."/usr_images";
4015 $images = array(
4016 "upload_".$a_user_id."pic",
4017 "usr_".$a_user_id."."."jpg",
4018 "usr_".$a_user_id."_small.jpg",
4019 "usr_".$a_user_id."_xsmall.jpg",
4020 "usr_".$a_user_id."_xxsmall.jpg",
4021 "upload_".$a_user_id);
4022 foreach ($images as $image)
4023 {
4024 if (is_file($image_dir."/".$image))
4025 {
4026 copy($image_dir."/".$image, $a_dir."/".$image);
4027 }
4028 }
4029 }

References ilUtil\getWebspaceDir().

Referenced by ilUserDataSet\getXmlRecord().

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

◆ delete()

ilObjUser::delete ( )

deletes a user @access public

Parameters
integeruser_id

Reimplemented from ilObject.

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

1290 {
1291 global $rbacadmin, $ilDB;
1292
1293 // deassign from ldap groups
1294 include_once('Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
1296 $mapping->deleteUser($this->getId());
1297
1298 // remove mailbox / update sent mails
1299 include_once ("Services/Mail/classes/class.ilMailbox.php");
1300 $mailbox = new ilMailbox($this->getId());
1301 $mailbox->delete();
1302 $mailbox->updateMailsOfDeletedUser($this->getLogin());
1303
1304 // delete feed blocks on personal desktop
1305 include_once("./Services/Block/classes/class.ilCustomBlock.php");
1306 $costum_block = new ilCustomBlock();
1307 $costum_block->setContextObjId($this->getId());
1308 $costum_block->setContextObjType("user");
1309 $c_blocks = $costum_block->queryBlocksForContext();
1310 include_once("./Services/Feeds/classes/class.ilPDExternalFeedBlock.php");
1311 foreach($c_blocks as $c_block)
1312 {
1313 if ($c_block["type"] == "pdfeed")
1314 {
1315 $fb = new ilPDExternalFeedBlock($c_block["id"]);
1316 $fb->delete();
1317 }
1318 }
1319
1320
1321 // delete block settings
1322 include_once("./Services/Block/classes/class.ilBlockSetting.php");
1324
1325 // delete user_account
1326 $ilDB->manipulateF("DELETE FROM usr_data WHERE usr_id = %s",
1327 array("integer"), array($this->getId()));
1328
1329 $this->deleteMultiTextFields();
1330
1331 // delete user_prefs
1333
1334 $this->removeUserPicture(false); // #8597
1335
1336 // delete user_session
1337 include_once("./Services/Authentication/classes/class.ilSession.php");
1339
1340 // remove user from rbac
1341 $rbacadmin->removeUser($this->getId());
1342
1343 // remove bookmarks
1344 // TODO: move this to class.ilBookmarkFolder
1345 $q = "DELETE FROM bookmark_tree WHERE tree = ".
1346 $ilDB->quote($this->getId(), "integer");
1347 $ilDB->manipulate($q);
1348
1349 $q = "DELETE FROM bookmark_data WHERE user_id = ".
1350 $ilDB->quote($this->getId(), "integer");
1351 $ilDB->manipulate($q);
1352
1353 // DELETE FORUM ENTRIES (not complete in the moment)
1354 include_once './Modules/Forum/classes/class.ilObjForum.php';
1355 ilObjForum::_deleteUser($this->getId());
1356
1357 // Delete link check notify entries
1358 include_once './Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
1360
1361 // Delete crs entries
1362 include_once './Modules/Course/classes/class.ilObjCourse.php';
1364
1365 // Delete user tracking
1366 include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
1368
1369 include_once 'Modules/Session/classes/class.ilEventParticipants.php';
1371
1372 // Delete Tracking data SCORM 2004 RTE
1373 include_once 'Modules/Scorm2004/classes/ilSCORM13Package.php';
1375
1376 // Delete Tracking data SCORM 1.2 RTE
1377 include_once 'Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php';
1379
1380 // remove all notifications
1381 include_once "./Services/Notification/classes/class.ilNotification.php";
1383
1384 // remove portfolios
1385 include_once "./Modules/Portfolio/classes/class.ilObjPortfolio.php";
1387
1388 // remove workspace
1389 include_once "./Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
1390 $tree = new ilWorkspaceTree($this->getId());
1391 $tree->cascadingDelete();
1392
1393 // remove disk quota entries
1394 include_once "./Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
1396
1397 // remove reminder entries
1398 require_once 'Services/User/classes/class.ilCronDeleteInactiveUserReminderMail.php';
1400
1401 // Delete user defined field entries
1403
1404 // Delete clipboard entries
1405 $this->clipboardDeleteAll();
1406
1407 // Reset owner
1408 $this->resetOwner();
1409
1410 include_once 'Services/Contact/classes/class.ilAddressbook.php';
1411 ilAddressbook::onUserDeletion($this);
1412
1413 // Trigger deleteUser Event
1414 global $ilAppEventHandler;
1415 $ilAppEventHandler->raise(
1416 'Services/User', 'deleteUser', array('usr_id' => $this->getId())
1417 );
1418
1419 // delete object data
1420 parent::delete();
1421 return true;
1422 }
static _deleteSettingsOfUser($a_user)
Delete block settings of user.
This is the super class of all custom blocks.
static deleteByOwner($a_owner_id)
Delete all entries for owner.
static _getInstance()
Get singleton instance of this class.
Mail Box class Base class for creating and handling mail boxes.
static removeForUser($user_id)
Remove all notifications for given user.
_deleteUser($a_usr_id)
static deleteUserPortfolios($a_user_id)
Delete all portfolio data for user.
static _deleteUser($a_usr_id)
deleteMultiTextFields()
Remove multi-text values from DB
removeUserPicture($a_do_update=true)
Remove user picture.
clipboardDeleteAll()
Delete objects of type for user.
getLogin()
get login / username @access public
deleteUserDefinedFieldEntries()
_deleteAllPref($a_user_id)
Deletes a userpref value of the user from the database @access public.
Custom block for external feeds on personal desktop.
static _removeTrackingDataForUser($user_id)
static _destroyByUserId($a_user_id)
Destroy session.
Tree handler for personal workspace.

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

+ Here is the call graph for this function:

◆ deleteMultiTextFields()

ilObjUser::deleteMultiTextFields ( )
protected

Remove multi-text values from DB

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

5724 {
5725 global $ilDB;
5726
5727 if(!$this->getId())
5728 {
5729 return;
5730 }
5731
5732 $ilDB->manipulate("DELETE FROM usr_data_multi".
5733 " WHERE usr_id = ".$ilDB->quote($this->getId(), "integer"));
5734 }

References $ilDB, and ilObject\getId().

Referenced by delete(), and updateMultiTextFields().

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

◆ deletePref()

ilObjUser::deletePref (   $a_keyword)

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

Parameters
stringkeyword

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

1080 {
1081 self::_deletePref($this->getId(), $a_keyword);
1082 }

References ilObject\getId().

+ Here is the call graph for this function:

◆ deleteUserDefinedFieldEntries()

ilObjUser::deleteUserDefinedFieldEntries ( )

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

4178 {
4179 global $ilDB;
4180
4181 include_once("./Services/User/classes/class.ilUserDefinedData.php");
4183
4184 // wrong place...
4185/* $query = "DELETE FROM udf_data ".
4186 "WHERE usr_id = ".$ilDB->quote($this->getId(),'integer');
4187 $res = $ilDB->manipulate($query);*/
4188
4189 return true;
4190 }
static deleteEntriesOfUser($a_user_id)
Delete data of user.

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

Referenced by delete().

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

◆ dropDesktopItem()

ilObjUser::dropDesktopItem (   $a_item_id,
  $a_type 
)

drop an item from user's personal desktop

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

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

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

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

+ Here is the call graph for this function:

◆ exportPersonalData()

ilObjUser::exportPersonalData ( )

Export personal data.

Parameters

return

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

5260 {
5261 include_once("./Services/Export/classes/class.ilExport.php");
5262 $exp = new ilExport();
5263 $dir = ilExport::_getExportDirectory($this->getId(), "xml", "usr", "personal_data");
5264 ilUtil::delDir($dir, true);
5265 $title = $this->getLastname().", ".$this->getLastname()." [".$this->getLogin()."]";
5266 $exp->exportEntity("personal_data", $this->getId(), "4.5.0",
5267 "Services/User", $title, $dir);
5268 }
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.
getLastname()
get lastname @access public
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively

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

+ Here is the call graph for this function:

◆ findInterests()

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

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

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

References $ilDB, $res, and $row.

Referenced by ilPublicUserProfileGUI\getAutocompleteResult().

+ Here is the caller graph for this function:

◆ getActive()

ilObjUser::getActive ( )

get user active state @access public

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

2209 {
2210 return $this->active;
2211 }

References $active.

◆ getAgreeDate()

ilObjUser::getAgreeDate ( )

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

Returns
string date of last update

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

2166 {
2167 return $this->agree_date;
2168 }

References $agree_date.

◆ getAppliedUsers()

& ilObjUser::getAppliedUsers ( )

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

2497 {
2498 $this->applied_users = array();
2499 $this->__readAppliedUsers($this->getId());
2500
2501 return $this->applied_users ? $this->applied_users : array();
2502 }

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

+ Here is the call graph for this function:

◆ getApproveDate()

ilObjUser::getApproveDate ( )

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

Returns
string approve date

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

2155 {
2156 return $this->approve_date;
2157 }

References $approve_date.

◆ getAuthMode()

ilObjUser::getAuthMode (   $a_auth_key = false)

get auth mode @access public

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

3629 {
3630 if (!$a_auth_key)
3631 {
3632 return $this->auth_mode;
3633 }
3634
3635 include_once('./Services/Authentication/classes/class.ilAuthUtils.php');
3636 return ilAuthUtils::_getAuthMode($this->auth_mode);
3637 }
_getAuthMode($a_auth_mode, $a_db_handler='')

References $auth_mode, and ilAuthUtils\_getAuthMode().

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

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

◆ getBirthday()

ilObjUser::getBirthday ( )

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

5096 {
5097 return $this->birthday;
5098 }

References $birthday.

◆ getCity()

ilObjUser::getCity ( )

get city @access public

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

1733 {
1734 return $this->city;
1735 }

References $city.

Referenced by ilPersonalProfileGUI\addLocationToForm().

+ Here is the caller graph for this function:

◆ getClientIP()

ilObjUser::getClientIP ( )

get client ip number @access public

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

1888 {
1889 return $this->client_ip;
1890 }

References $client_ip.

◆ getClipboardChilds()

ilObjUser::getClipboardChilds (   $a_parent,
  $a_insert_time 
)

Get childs of an item.

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

3536 {
3537 global $ilDB, $ilUser;
3538
3539 $objs = $ilDB->queryF("SELECT * FROM personal_clipboard WHERE ".
3540 "user_id = %s AND parent = %s AND insert_time = %s ".
3541 " ORDER BY order_nr",
3542 array("integer", "integer", "timestamp"),
3543 array($ilUser->getId(), (int) $a_parent, $a_insert_time));
3544 $objects = array();
3545 while ($obj = $ilDB->fetchAssoc($objs))
3546 {
3547 if ($obj["type"] == "mob")
3548 {
3549 $obj["title"] = ilObject::_lookupTitle($obj["item_id"]);
3550 }
3551 $objects[] = array ("id" => $obj["item_id"],
3552 "type" => $obj["type"], "title" => $obj["title"]);
3553 }
3554 return $objects;
3555 }

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

+ Here is the call graph for this function:

◆ getClipboardObjects()

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

get all clipboard objects of user and specified type

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

3496 {
3497 global $ilDB;
3498
3499 $par = "";
3500 if ($a_top_nodes_only)
3501 {
3502 $par = " AND parent = ".$ilDB->quote(0, "integer")." ";
3503 }
3504
3505 $type_str = ($a_type != "")
3506 ? " AND type = ".$ilDB->quote($a_type, "text")." "
3507 : "";
3508 $q = "SELECT * FROM personal_clipboard WHERE ".
3509 "user_id = ".$ilDB->quote($this->getId(), "integer")." ".
3510 $type_str.$par.
3511 " ORDER BY order_nr";
3512 $objs = $ilDB->query($q);
3513 $objects = array();
3514 while ($obj = $ilDB->fetchAssoc($objs))
3515 {
3516 if ($obj["type"] == "mob")
3517 {
3518 $obj["title"] = ilObject::_lookupTitle($obj["item_id"]);
3519 }
3520 if ($obj["type"] == "incl")
3521 {
3522 include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
3523 $obj["title"] = ilMediaPoolPage::lookupTitle($obj["item_id"]);
3524 }
3525 $objects[] = array ("id" => $obj["item_id"],
3526 "type" => $obj["type"], "title" => $obj["title"],
3527 "insert_time" => $obj["insert_time"]);
3528 }
3529 return $objects;
3530 }
static lookupTitle($a_page_id)
Lookup title.

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

+ Here is the call graph for this function:

◆ getComment()

ilObjUser::getComment ( )

get referral comment @access public

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

2134 {
2136 }

References $referral_comment.

◆ getCountry()

ilObjUser::getCountry ( )

Get country (free text)

@access public

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

1773 {
1774 return $this->country;
1775 }

References $country.

Referenced by ilPersonalProfileGUI\addLocationToForm().

+ Here is the caller graph for this function:

◆ getCurrentLanguage()

ilObjUser::getCurrentLanguage ( )

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

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

2071 {
2072 return $_SESSION['lang'];
2073 }

References $_SESSION.

◆ getDateFormat()

ilObjUser::getDateFormat ( )

get date format

@access public

Returns

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

1209 {
1210 if($format = $this->getPref('date_format'))
1211 {
1212 return $format;
1213 }
1214 else
1215 {
1216 include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
1218 return $settings->getDefaultDateFormat();
1219 }
1220 }
static _getInstance()
get singleton instance
getPref($a_keyword)
get a user preference

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

+ Here is the call graph for this function:

◆ getDelicious()

ilObjUser::getDelicious ( )

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

4384 {
4385 return $this->delicious;
4386 }

References $delicious.

◆ getDepartment()

ilObjUser::getDepartment ( )

get department @access public

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

1695 {
1696 return $this->department;
1697 }

References $department.

◆ getDesktopItems()

ilObjUser::getDesktopItems (   $a_types = "")

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

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

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

+ Here is the call graph for this function:

◆ getDiskQuota()

ilObjUser::getDiskQuota ( )
Returns the minimal disk quota imposed by this user account.

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

@access public

Returns
integer

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

2010 {
2011 return $this->prefs["disk_quota"] ? $this->prefs["disk_quota"] : 0;
2012 }

◆ getEmail()

ilObjUser::getEmail ( )

get email address @access public

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

1943 {
1944 return $this->email;
1945 }

References $email.

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

+ Here is the caller graph for this function:

◆ getExternalAccount()

ilObjUser::getExternalAccount ( )

get external account

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

@access     public

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

3659 {
3660 return $this->ext_account;
3661 }

Referenced by ilECSAppEventListener\handleMembership().

+ Here is the caller graph for this function:

◆ getFax()

ilObjUser::getFax ( )

get fax @access public

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

1869 {
1870 return $this->fax;
1871 }

References $fax.

◆ getFirstLettersOfLastnames()

static ilObjUser::getFirstLettersOfLastnames ( )
static

Get first letters of all lastnames.

Parameters

return

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

5204 {
5205 global $ilDB;
5206
5207 $q = "SELECT DISTINCT ".$ilDB->upper($ilDB->substr("lastname", 1, 1))." let".
5208 " FROM usr_data".
5209 " WHERE usr_id <> ".$ilDB->quote(ANONYMOUS_USER_ID, "integer").
5210 " ORDER BY let";
5211 $let_set = $ilDB->query($q);
5212
5213 $lets = array();
5214 while ($let_rec = $ilDB->fetchAssoc($let_set))
5215 {
5216 $let[$let_rec["let"]] = $let_rec["let"];
5217 }
5218 return $let;
5219 }

References $ilDB.

Referenced by ilObjUserFolderGUI\viewObject().

+ Here is the caller graph for this function:

◆ getFirstname()

ilObjUser::getFirstname ( )

get firstname @access public

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

1638 {
1639 return $this->firstname;
1640 }

References $firstname.

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

+ Here is the caller graph for this function:

◆ getFullname()

ilObjUser::getFullname (   $a_max_strlen = 0)

get fullname @access public

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

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

1478 {
1479 if (!$a_max_strlen)
1480 {
1481 return ilUtil::stripSlashes($this->fullname);
1482 }
1483
1484 if (strlen($this->fullname) <= $a_max_strlen)
1485 {
1486 return ilUtil::stripSlashes($this->fullname);
1487 }
1488
1489 if ((strlen($this->utitle) + strlen($this->lastname) + 4) <= $a_max_strlen)
1490 {
1491 return ilUtil::stripSlashes($this->utitle." ".substr($this->firstname,0,1).". ".$this->lastname);
1492 }
1493
1494 if ((strlen($this->firstname) + strlen($this->lastname) + 1) <= $a_max_strlen)
1495 {
1496 return ilUtil::stripSlashes($this->firstname." ".$this->lastname);
1497 }
1498
1499 if ((strlen($this->lastname) + 3) <= $a_max_strlen)
1500 {
1501 return ilUtil::stripSlashes(substr($this->firstname,0,1).". ".$this->lastname);
1502 }
1503
1504 return ilUtil::stripSlashes(substr($this->lastname,0,$a_max_strlen));
1505 }
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References ilUtil\stripSlashes().

Referenced by shibUser\createFields().

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

◆ getGender()

ilObjUser::getGender ( )

get gender @access public

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

1596 {
1597 return $this->gender;
1598 }

References $gender.

◆ getGeneralInterests()

ilObjUser::getGeneralInterests ( )

Get general interests.

Returns
array $value

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

5538 {
5540 }

References $interests_general.

Referenced by updateMultiTextFields().

+ Here is the caller graph for this function:

◆ getGeneralInterestsAsText()

ilObjUser::getGeneralInterestsAsText ( )

Get general interests as plain text.

Returns
string

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

5548 {
5549 return $this->buildTextFromArray("interests_general");
5550 }
buildTextFromArray($a_attr)
Convert multi-text values to plain text.

References buildTextFromArray().

+ Here is the call graph for this function:

◆ getHobby()

ilObjUser::getHobby ( )

get hobby @access public

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

1962 {
1963 return $this->hobby;
1964 }

References $hobby.

◆ getInactivationDate()

ilObjUser::getInactivationDate ( )

getter for inactivation date

Returns
string $inactivation_date

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

5406 {
5408 }

References $inactivation_date.

◆ getInstantMessengerId()

ilObjUser::getInstantMessengerId (   $a_im_type)

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

4373 {
4374 $var = "im_".$a_im_type;
4375 return $this->$var;
4376 }

◆ getInstitution()

ilObjUser::getInstitution ( )

get institution @access public

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

1676 {
1677 return $this->institution;
1678 }

References $institution.

◆ getLanguage()

ilObjUser::getLanguage ( )

returns a 2char-language-string @access public

Returns
string language

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

1983 {
1984 return $this->prefs["language"];
1985 }

Referenced by ilNotificationConfig\getUserInstance().

+ Here is the caller graph for this function:

◆ getLastLogin()

ilObjUser::getLastLogin ( )

returns last login date @access public

Returns
string date

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

2101 {
2102 return $this->last_login;
2103 }

◆ getLastname()

ilObjUser::getLastname ( )

get lastname @access public

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

1657 {
1658 return $this->lastname;
1659 }

References $lastname.

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

+ Here is the caller graph for this function:

◆ getLastPasswordChangeTS()

ilObjUser::getLastPasswordChangeTS ( )

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

2025 {
2027 }

References $last_password_change_ts.

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

+ Here is the caller graph for this function:

◆ getLastUpdate()

ilObjUser::getLastUpdate ( )

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

2115 {
2116 return $this->last_update;
2117 }

References ilObject\$last_update.

◆ getLatitude()

ilObjUser::getLatitude ( )

Get Latitude.

Returns
string Latitude

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

2452 {
2453 return $this->latitude;
2454 }

References $latitude.

Referenced by ilPersonalProfileGUI\addLocationToForm().

+ Here is the caller graph for this function:

◆ getLocationZoom()

ilObjUser::getLocationZoom ( )

Get Location Zoom.

Returns
int Location Zoom

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

2492 {
2493 return $this->loc_zoom;
2494 }

References $loc_zoom.

Referenced by ilPersonalProfileGUI\addLocationToForm().

+ Here is the caller graph for this function:

◆ getLogin()

ilObjUser::getLogin ( )

get login / username @access public

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

1544 {
1545 return $this->login;
1546 }

References $login.

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

+ Here is the caller graph for this function:

◆ getLoginAttempts()

ilObjUser::getLoginAttempts ( )

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

2329 {
2330 return $this->login_attempts;
2331 }

References $login_attempts.

◆ getLoginByUserId()

ilObjUser::getLoginByUserId (   $a_userid)

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

2685 {
2686 $login = ilObjUser::_lookupLogin($a_userid);
2687 return $login ? $login : false;
2688 }
_lookupLogin($a_user_id)
lookup login

References $login, and _lookupLogin().

Referenced by ilObjPaymentSettingsGUI\editVendorObject().

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

2573 {
2574 global $ilAuth;
2575
2576 // BEGIN WebDAV: Strip Microsoft Domain Names from logins
2577 require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
2579 {
2580 require_once ('Services/WebDAV/classes/class.ilDAVServer.php');
2581 require_once ('Services/Database/classes/class.ilAuthContainerMDB2.php');
2582 $login = ilAuthContainerMDB2::toUsernameWithoutDomain($ilAuth->getUsername());
2583 }
2584 else
2585 {
2586 $login =$ilAuth->getUsername();
2587 }
2588
2589 return $login;
2590 }
static toUsernameWithoutDomain($username)
Static function removes Microsoft domain name from username.

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

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

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

◆ getLongitude()

ilObjUser::getLongitude ( )

Get Longitude.

Returns
string Longitude

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

2472 {
2473 return $this->longitude;
2474 }

References $longitude.

Referenced by ilPersonalProfileGUI\addLocationToForm().

+ Here is the caller graph for this function:

◆ getLookingForHelp()

ilObjUser::getLookingForHelp ( )

Get help looking for.

Returns
array $value

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

5598 {
5600 }

References $interests_help_looking.

Referenced by updateMultiTextFields().

+ Here is the caller graph for this function:

◆ getLookingForHelpAsText()

ilObjUser::getLookingForHelpAsText ( )

Get help looking for as plain text.

Returns
string

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

5608 {
5609 return $this->buildTextFromArray("interests_help_looking");
5610 }

References buildTextFromArray().

+ Here is the call graph for this function:

◆ getMatriculation()

ilObjUser::getMatriculation ( )

get matriculation number @access public

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

1907 {
1908 return $this->matriculation;
1909 }

References $matriculation.

◆ getOfferingHelp()

ilObjUser::getOfferingHelp ( )

Get help offering.

Returns
array $value

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

5568 {
5570 }

References $interests_help_offered.

Referenced by updateMultiTextFields().

+ Here is the caller graph for this function:

◆ getOfferingHelpAsText()

ilObjUser::getOfferingHelpAsText ( )

Get help offering as plain text.

Returns
string

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

5578 {
5579 return $this->buildTextFromArray("interests_help_offered");
5580 }

References buildTextFromArray().

+ Here is the call graph for this function:

◆ getPasswd()

ilObjUser::getPasswd ( )

get password

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

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

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

References $passwd.

Referenced by ilUserPasswordManager\verifyPassword().

+ Here is the caller graph for this function:

◆ getPasswdType()

ilObjUser::getPasswdType ( )

get password type

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

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

1577 {
1578 return $this->passwd_type;
1579 }

References $passwd_type.

◆ getPasswordAge()

ilObjUser::getPasswordAge ( )

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

2402 {
2403 $current_ts = time();
2404 $pass_change_ts = $this->getLastPasswordChangeTS();
2405 $password_age = (int) ( ($current_ts - $pass_change_ts) / 86400 );
2406 return $password_age;
2407 }

References getLastPasswordChangeTS().

+ Here is the call graph for this function:

◆ getPasswordEncodingType()

ilObjUser::getPasswordEncodingType ( )
Returns
string

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

299 {
301 }

References $password_encoding_type.

Referenced by ilUserPasswordManager\verifyPassword().

+ Here is the caller graph for this function:

◆ getPasswordSalt()

ilObjUser::getPasswordSalt ( )
Returns
string|null

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

315 {
317 }

References $password_salt.

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

+ Here is the caller graph for this function:

◆ getPCClipboardContent()

ilObjUser::getPCClipboardContent ( )

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

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

3429 {
3430 global $ilDB;
3431
3432 $set = $ilDB->queryF("SELECT MAX(insert_time) mtime FROM personal_pc_clipboard ".
3433 " WHERE user_id = %s", array("integer"), array($this->getId()));
3434 $row = $ilDB->fetchAssoc($set);
3435
3436 $set = $ilDB->queryF("SELECT * FROM personal_pc_clipboard ".
3437 " WHERE user_id = %s AND insert_time = %s ORDER BY order_nr ASC",
3438 array("integer", "timestamp"),
3439 array($this->getId(), $row["mtime"]));
3440 $content = array();
3441 while ($row = $ilDB->fetchAssoc($set))
3442 {
3443 $content[] = $row["content"];
3444 }
3445
3446 return $content;
3447 }

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

+ Here is the call graph for this function:

◆ getPersonalDataExportFile()

ilObjUser::getPersonalDataExportFile ( )

Get personal data export file.

Parameters

return

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

5277 {
5278 include_once("./Services/Export/classes/class.ilExport.php");
5279 $dir = ilExport::_getExportDirectory($this->getId(), "xml", "usr", "personal_data");
5280 if (!is_dir($dir))
5281 {
5282 return "";
5283 }
5284 foreach(ilUtil::getDir($dir) as $entry)
5285 {
5286 if (is_int(strpos($entry["entry"], ".zip")))
5287 {
5288 return $entry["entry"];
5289 }
5290 }
5291
5292 return "";
5293 }
static getDir($a_dir, $a_rec=false, $a_sub_dir="")
get directory

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

Referenced by sendPersonalDataFile().

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

◆ getPersonalPicturePath()

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

Get path to personal picture.

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

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

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

3913 {
3914 if(isset(self::$personal_image_cache[$this->getId()][$a_size][(int)$a_force_pic]))
3915 {
3916 return self::$personal_image_cache[$this->getId()][$a_size][(int)$a_force_pic];
3917 }
3918
3919 self::$personal_image_cache[$this->getId()][$a_size][(int)$a_force_pic] = ilObjUser::_getPersonalPicturePath($this->getId(), $a_size, $a_force_pic);
3920
3921 return self::$personal_image_cache[$this->getId()][$a_size][(int)$a_force_pic];
3922 }
static _getPersonalPicturePath($a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false)
Get path to personal picture.

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

+ Here is the call graph for this function:

◆ getPersonalWorkspaceDiskQuota()

ilObjUser::getPersonalWorkspaceDiskQuota ( )

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

2015 {
2016 return $this->prefs["wsp_disk_quota"] ? $this->prefs["wsp_disk_quota"] : 0;
2017 }

◆ getPhoneHome()

ilObjUser::getPhoneHome ( )

get home phone @access public

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

1831 {
1832 return $this->phone_home;
1833 }

References $phone_home.

◆ getPhoneMobile()

ilObjUser::getPhoneMobile ( )

get mobile phone @access public

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

1850 {
1851 return $this->phone_mobile;
1852 }

References $phone_mobile.

◆ getPhoneOffice()

ilObjUser::getPhoneOffice ( )

get office phone @access public

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

1812 {
1813 return $this->phone_office;
1814 }

References $phone_office.

◆ getPref()

ilObjUser::getPref (   $a_keyword)

get a user preference

Parameters
stringname of parameter @access public

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

1242 {
1243 if (array_key_exists($a_keyword, $this->prefs))
1244 {
1245 return $this->prefs[$a_keyword];
1246 }
1247 else
1248 {
1249 return FALSE;
1250 }
1251 }

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

+ Here is the caller graph for this function:

◆ getProfileIncomplete()

ilObjUser::getProfileIncomplete ( )

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

2351 {
2352 if($this->id == ANONYMOUS_USER_ID)
2353 {
2354 return false;
2355 }
2356 return $this->profile_incomplete;
2357 }

◆ getPublicName()

ilObjUser::getPublicName ( )

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

Returns
string

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

4787 {
4788 if ($this->hasPublicProfile())
4789 return $this->getFirstname()." ".$this->getLastname()." (".$this->getLogin().")";
4790 else
4791 return $this->getLogin();
4792
4793 }
hasPublicProfile()
returns true if public is profile, false otherwise
getFirstname()
get firstname @access public

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

+ Here is the call graph for this function:

◆ getSelectedCountry()

ilObjUser::getSelectedCountry ( )

Get selected country (selection drop down)

Returns
string selected country

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

1793 {
1794 return $this->sel_country;
1795 }

References $sel_country.

◆ getStoredActive()

ilObjUser::getStoredActive (   $a_id)

get user active state

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

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

2266 {
2267 $active = ilObjUser::_lookup($a_id, "active");
2268 return $active ? true : false;
2269 }

References $active, and _lookup().

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

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

◆ getStreet()

ilObjUser::getStreet ( )

get street @access public

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

1714 {
1715 return $this->street;
1716 }

References $street.

Referenced by ilPersonalProfileGUI\addLocationToForm().

+ Here is the caller graph for this function:

◆ getTimeFormat()

ilObjUser::getTimeFormat ( )

get time format

@access public

Returns

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

1189 {
1190 if($format = $this->getPref('time_format'))
1191 {
1192 return $format;
1193 }
1194 else
1195 {
1196 include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
1198 return $settings->getDefaultTimeFormat();
1199 }
1200 }

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

+ Here is the call graph for this function:

◆ getTimeLimitFrom()

ilObjUser::getTimeLimitFrom ( )

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

2295 {
2296 return $this->time_limit_from ? $this->time_limit_from : time();
2297 }

Referenced by checkTimeLimit().

+ Here is the caller graph for this function:

◆ getTimeLimitMessage()

ilObjUser::getTimeLimitMessage ( )

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

2319 {
2320 return $this->time_limit_message;
2321 }

◆ getTimeLimitOwner()

ilObjUser::getTimeLimitOwner ( )

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

2287 {
2288 return $this->time_limit_owner ? $this->time_limit_owner : 7;
2289 }

◆ getTimeLimitUnlimited()

ilObjUser::getTimeLimitUnlimited ( )

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

2311 {
2312 return $this->time_limit_unlimited;
2313 }

Referenced by checkTimeLimit().

+ Here is the caller graph for this function:

◆ getTimeLimitUntil()

ilObjUser::getTimeLimitUntil ( )

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

2303 {
2304 return $this->time_limit_until ? $this->time_limit_until : time();
2305 }

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

+ Here is the caller graph for this function:

◆ getTimeZone()

ilObjUser::getTimeZone ( )

get timezone of user

@access public

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

1169 {
1170 if($tz = $this->getPref('user_tz'))
1171 {
1172 return $tz;
1173 }
1174 else
1175 {
1176 include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
1178 return $settings->getDefaultTimeZone();
1179 }
1180 }

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

+ Here is the call graph for this function:

◆ getUserDefinedData()

ilObjUser::getUserDefinedData ( )

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

4093 {
4094 return $this->user_defined_data ? $this->user_defined_data : array();
4095 }

◆ getUserIdByEmail()

ilObjUser::getUserIdByEmail (   $a_email)
static

STATIC METHOD get the user_id of an email address.

Parameters
stringemail of user
Returns
integer id of user

@access public

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

2666 {
2667 global $ilDB;
2668
2669 $res = $ilDB->queryF("SELECT usr_id FROM usr_data ".
2670 "WHERE email = %s", array("text"), array($a_email));
2671
2672 $row = $ilDB->fetchObject($res);
2673 return $row->usr_id ? $row->usr_id : 0;
2674 }

References $ilDB, $res, and $row.

Referenced by ilObjUserTest\testAuthAndEmailMethods().

+ Here is the caller graph for this function:

◆ getUserIdByLogin()

◆ getUTitle()

ilObjUser::getUTitle ( )

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

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

1619 {
1620 return $this->utitle;
1621 }

References $utitle.

◆ getZipcode()

ilObjUser::getZipcode ( )

get zipcode @access public

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

1752 {
1753 return $this->zipcode;
1754 }

References $zipcode.

◆ hasActiveSession()

static ilObjUser::hasActiveSession (   $a_user_id)
static

Check for simultaneous login.

Returns
bool

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

2541 {
2542 global $ilDB;
2543
2544 $set = $ilDB->queryf('
2545 SELECT COUNT(*) session_count
2546 FROM usr_session WHERE user_id = %s AND expires > %s',
2547 array('integer', 'integer'),
2548 array($a_user_id, time()));
2549 $row = $ilDB->fetchAssoc($set);
2550 return (bool)$row['session_count'];
2551 }

References $ilDB, and $row.

Referenced by ilAuthBase\loginObserver().

+ Here is the caller graph for this function:

◆ hasDeletionFlag()

ilObjUser::hasDeletionFlag ( )

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

5500 {
5501 return (bool)$this->getPref("delete_flag");
5502 }

References getPref().

+ Here is the call graph for this function:

◆ hasPublicProfile()

ilObjUser::hasPublicProfile ( )

returns true if public is profile, false otherwise

Returns
boolean

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

4777 {
4778 return in_array($this->getPref("public_profile"), array("y", "g"));
4779 }

References getPref().

Referenced by getPublicName().

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

5468 {
5469 if(null === $status)
5470 {
5471 return ilSession::get('has_to_accept_agr_in_session');
5472 }
5473
5474 require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
5475 if(ilTermsOfServiceHelper::isEnabled())
5476 {
5477 ilSession::set('has_to_accept_agr_in_session', (int)$status);
5478 }
5479 }
static set($a_var, $a_val)
Set a value.
static get($a_var)
Get a value.

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

Referenced by ilTermsOfServiceHelper\trackAcceptance().

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

◆ importPersonalData()

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

Import personal data.

Parameters

return

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

5320 {
5321 include_once("./Services/Export/classes/class.ilImport.php");
5322 $imp = new ilImport();
5323 if (!$a_profile_data)
5324 {
5325 $imp->addSkipEntity("Services/User", "usr_profile");
5326 }
5327 if (!$a_settings)
5328 {
5329 $imp->addSkipEntity("Services/User", "usr_setting");
5330 }
5331 if (!$a_bookmarks)
5332 {
5333 $imp->addSkipEntity("Services/Bookmarks", "bookmarks");
5334 }
5335 if (!$a_notes)
5336 {
5337 $imp->addSkipEntity("Services/Notes", "user_notes");
5338 }
5339 if (!$a_calendar)
5340 {
5341 $imp->addSkipEntity("Services/Calendar", "calendar");
5342 }
5343 $imp->importEntity($a_file["tmp_name"], $a_file["name"], "personal_data",
5344 "Services/User");
5345 }
Import class.

◆ initInactivationDate()

static ilObjUser::initInactivationDate (   $usrIds)
staticprivate

@global type $ilDB

Parameters
type$usrIds

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

5353 {
5354 global $ilDB;
5355
5356 $NOW = $ilDB->now();
5357
5358 $usrId_IN_usrIds = $ilDB->in('usr_id', $usrIds, false, 'integer');
5359
5360 $queryString = "
5361 UPDATE usr_data
5362 SET inactivation_date = $NOW
5363 WHERE inactivation_date IS NULL
5364 AND $usrId_IN_usrIds
5365 ";
5366
5367 $ilDB->manipulate($queryString);
5368 }

References $ilDB.

◆ isAnonymous()

ilObjUser::isAnonymous ( )
Returns
bool

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

5485 {
5486 return $this->getId() == ANONYMOUS_USER_ID;
5487 }

References ilObject\getId().

+ Here is the call graph for this function:

◆ isCaptchaVerified()

ilObjUser::isCaptchaVerified ( )

Is user captcha verified?

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

5239 {
5240 return (boolean) $_SESSION["user_captcha_verified"];
5241 }

References $_SESSION.

◆ isChild()

ilObjUser::isChild (   $a_usr_id)

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

2505 {
2506 if($a_usr_id == $this->getId())
2507 {
2508 return true;
2509 }
2510
2511 $this->applied_users = array();
2512 $this->__readAppliedUsers($this->getId());
2513
2514 return in_array($a_usr_id,$this->applied_users);
2515 }

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

+ Here is the call graph for this function:

◆ isCurrentUserActive()

ilObjUser::isCurrentUserActive ( )

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

2598 {
2599 global $ilDB,$ilAuth;
2600
2602 $set = $ilDB->queryF("SELECT active FROM usr_data WHERE login= %s",
2603 array("text"),
2604 array($login));
2605 //query has got a result
2606 if ($rec = $ilDB->fetchAssoc($set))
2607 {
2608 if ($rec["active"])
2609 {
2610 return true;
2611 }
2612 }
2613
2614 return false;
2615 }

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

+ Here is the call graph for this function:

◆ isDesktopItem()

ilObjUser::isDesktopItem (   $a_item_id,
  $a_type 
)

check wether an item is on the users desktop or not

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

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

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

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

+ Here is the call graph for this function:

◆ isPasswordChangeDemanded()

ilObjUser::isPasswordChangeDemanded ( )

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

2360 {
2361 //error_reporting(E_ALL);
2362 if( $this->id == ANONYMOUS_USER_ID || $this->id == SYSTEM_USER_ID )
2363 return false;
2364
2365 require_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
2367
2369 && $security->isPasswordChangeOnFirstLoginEnabled()
2370 && $this->getLastPasswordChangeTS() == 0
2371 && $this->is_self_registered == false
2372 ){
2373 return true;
2374 }
2375 else return false;
2376 }
static _needsExternalAccountByAuthMode($a_auth_mode)
Check if chosen auth mode needs an external account entry.
getAuthMode($a_auth_key=false)
get auth mode @access public
static _getInstance()
Get instance of ilSecuritySettings.

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

+ Here is the call graph for this function:

◆ isPasswordExpired()

ilObjUser::isPasswordExpired ( )

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

2379 {
2380 //error_reporting(E_ALL);
2381 if($this->id == ANONYMOUS_USER_ID) return false;
2382
2383 require_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
2385 if( $this->getLastPasswordChangeTS() > 0 )
2386 {
2387 $max_pass_age = $security->getPasswordMaxAge();
2388 if( $max_pass_age > 0 )
2389 {
2390 $max_pass_age_ts = ( $max_pass_age * 86400 );
2391 $pass_change_ts = $this->getLastPasswordChangeTS();
2392 $current_ts = time();
2393
2394 if( ($current_ts - $pass_change_ts) > $max_pass_age_ts )
2395 return true;
2396 }
2397 }
2398 return false;
2399 }

References ilSecuritySettings\_getInstance(), and getLastPasswordChangeTS().

+ Here is the call graph for this function:

◆ isSelfRegistered()

ilObjUser::isSelfRegistered ( )

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

5513 {
5514 return (bool) $this->is_self_registered;
5515 }

References $is_self_registered.

◆ lookupMatriculation()

static ilObjUser::lookupMatriculation (   $a_usr_id)
static

Lookup matriculation.

Returns
string matricualtion
Parameters
int$a_usr_id@access public

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

1918 {
1919 global $ilDB;
1920
1921 $query = "SELECT matriculation FROM usr_data ".
1922 "WHERE usr_id = ".$ilDB->quote($a_usr_id);
1923 $res = $ilDB->query($query);
1924 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
1925 return $row->matriculation ? $row->matriculation : '';
1926 }

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilObjCourseGrouping\_checkGroupingDependencies().

+ Here is the caller graph for this function:

◆ preloadIsDesktopItem()

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

Preload desktop item information.

Parameters

return

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

3211 {
3212 global $ilDB;
3213
3214 if (!is_array($a_item_ids))
3215 {
3216 return;
3217 }
3218
3219 $item_ids = array();
3220 foreach ($a_item_ids as $id)
3221 {
3222 if (!self::$is_desktop_item_loaded[$a_usr_id.":".$id])
3223 {
3224 $item_ids[] = $id;
3225 }
3226 self::$is_desktop_item_loaded[$a_usr_id.":".$id] = true;
3227 }
3228
3229 if (count($item_ids) > 0)
3230 {
3231 $item_set = $ilDB->query("SELECT item_id, type FROM desktop_item WHERE ".
3232 $ilDB->in("item_id", $item_ids, false, "integer").
3233 " AND user_id = ".$ilDB->quote($a_usr_id, "integer"));
3234 while ($r = $ilDB->fetchAssoc($item_set))
3235 {
3236 self::$is_desktop_item_cache[$a_usr_id.":".$r["item_id"].":".$r["type"]]
3237 = true;
3238 }
3239 }
3240 }

References ilObject\$id, and $ilDB.

Referenced by ilObjectListGUIPreloader\preload().

+ Here is the caller graph for this function:

◆ read()

ilObjUser::read ( )

loads a record "user" from database @access private

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

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

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

Referenced by __construct().

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

◆ readMultiTextFields()

ilObjUser::readMultiTextFields ( )
protected

Fetch multi-text values from DB.

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

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

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

Referenced by read().

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

◆ readPrefs()

ilObjUser::readPrefs ( )

get all user preferences @access private

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

1273 {
1274 global $ilDB;
1275
1276 if (is_array($this->prefs))
1277 {
1278 $this->oldPrefs = $this->prefs;
1279 }
1280
1281 $this->prefs = ilObjUser::_getPreferences($this->id);
1282 }
static _getPreferences($user_id)
get preferences for user

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

Referenced by read().

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

◆ readUserDefinedFields()

ilObjUser::readUserDefinedFields ( )

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

4142 {
4143 global $ilDB;
4144
4145 include_once("./Services/User/classes/class.ilUserDefinedData.php");
4146 $udata = new ilUserDefinedData($this->getId());
4147
4148/* $query = "SELECT * FROM udf_data ".
4149 "WHERE usr_id = ".$ilDB->quote($this->getId(),'integer');
4150
4151 $res = $this->db->query($query);
4152 while($row = $res->fetchRow(DB_FETCHMODE_ASSOC))
4153 {
4154 $this->user_defined_data = $row;
4155 }*/
4156
4157 $this->user_defined_data = $udata->getAll();
4158
4159 return true;
4160 }
Class ilUserDefinedData.

References $ilDB, and ilObject\getId().

Referenced by read().

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

◆ refreshLogin()

ilObjUser::refreshLogin ( )

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

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

849 {
850 global $ilDB;
851
852 $ilDB->manipulateF("UPDATE usr_data SET ".
853 "last_login = ".$ilDB->now().
854 " WHERE usr_id = %s",
855 array("integer"), array($this->id));
856 }

References $ilDB.

◆ removeDeletionFlag()

ilObjUser::removeDeletionFlag ( )

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

5495 {
5496 $this->writePref("delete_flag", false);
5497 }

References writePref().

+ Here is the call graph for this function:

◆ removeObjectFromClipboard()

ilObjUser::removeObjectFromClipboard (   $a_item_id,
  $a_type 
)

remove object from user's personal clipboard

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

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

3590 {
3591 global $ilDB;
3592
3593 $q = "DELETE FROM personal_clipboard WHERE ".
3594 "item_id = ".$ilDB->quote($a_item_id, "integer").
3595 " AND type = ".$ilDB->quote($a_type, "text")." ".
3596 " AND user_id = ".$ilDB->quote($this->getId(), "integer");
3597 $ilDB->manipulate($q);
3598 }

References $ilDB, and ilObject\getId().

+ Here is the call graph for this function:

◆ removeUserPicture()

ilObjUser::removeUserPicture (   $a_do_update = true)

Remove user picture.

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

4036 {
4037 $webspace_dir = ilUtil::getWebspaceDir();
4038 $image_dir = $webspace_dir."/usr_images";
4039 $file = $image_dir."/usr_".$this->getID()."."."jpg";
4040 $thumb_file = $image_dir."/usr_".$this->getID()."_small.jpg";
4041 $xthumb_file = $image_dir."/usr_".$this->getID()."_xsmall.jpg";
4042 $xxthumb_file = $image_dir."/usr_".$this->getID()."_xxsmall.jpg";
4043 $upload_file = $image_dir."/upload_".$this->getID();
4044
4045 if($a_do_update)
4046 {
4047 // remove user pref file name
4048 $this->setPref("profile_image", "");
4049 $this->update();
4050 }
4051
4052 if (@is_file($file))
4053 {
4054 unlink($file);
4055 }
4056 if (@is_file($thumb_file))
4057 {
4058 unlink($thumb_file);
4059 }
4060 if (@is_file($xthumb_file))
4061 {
4062 unlink($xthumb_file);
4063 }
4064 if (@is_file($xxthumb_file))
4065 {
4066 unlink($xxthumb_file);
4067 }
4068 if (@is_file($upload_file))
4069 {
4070 unlink($upload_file);
4071 }
4072 }
setPref($a_keyword, $a_value)
set a user preference
update()
update object in db

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

Referenced by delete().

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

◆ resetInactivationDate()

static ilObjUser::resetInactivationDate (   $usrIds)
staticprivate

@global type $ilDB

Parameters
type$usrIds

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

5376 {
5377 global $ilDB;
5378
5379 $usrId_IN_usrIds = $ilDB->in('usr_id', $usrIds, false, 'integer');
5380
5381 $queryString = "
5382 UPDATE usr_data
5383 SET inactivation_date = NULL
5384 WHERE $usrId_IN_usrIds
5385 ";
5386
5387 $ilDB->manipulate($queryString);
5388 }

References $ilDB.

◆ resetLastPasswordChange()

ilObjUser::resetLastPasswordChange ( )

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

2425 {
2426 global $ilDB;
2427
2428 $query = "UPDATE usr_data SET last_password_change = 0 " .
2429 "WHERE usr_id = %s";
2430 $affected = $ilDB->manipulateF( $query, array('integer'),
2431 array($this->getId()) );
2432 if($affected) return true;
2433 else return false;
2434 }

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

+ Here is the call graph for this function:

◆ resetOwner()

ilObjUser::resetOwner ( )

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

5186 {
5187 global $ilDB;
5188
5189 $query = "UPDATE object_data SET owner = 0 ".
5190 "WHERE owner = ".$ilDB->quote($this->getId(),'integer');
5191 $ilDB->query($query);
5192
5193 return true;
5194 }

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

Referenced by delete().

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

◆ searchUsers()

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

STATIC METHOD get the user_ids which correspond a search string.

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

@access public

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

2701 {
2702 global $ilias, $ilDB, $ilLog;
2703
2704
2705 $query = "SELECT usr_data.usr_id, usr_data.login, usr_data.firstname, usr_data.lastname, usr_data.email, usr_data.active FROM usr_data ";
2706
2707 $without_anonymous_users = true;
2708
2709 // determine join filter
2710 $join_filter = " WHERE ";
2711 if ($filter_settings !== FALSE && strlen($filter_settings))
2712 {
2713 switch ($filter_settings)
2714 {
2715 case 3:
2716 // show only users without courses
2717 $join_filter = " LEFT JOIN obj_members ON usr_data.usr_id = obj_members.usr_id WHERE obj_members.usr_id IS NULL AND ";
2718 break;
2719 case 5:
2720 // show only users with a certain course membership
2721 $ref_id = $_SESSION["user_filter_data"];
2722 if ($ref_id)
2723 {
2724 $join_filter = " LEFT JOIN obj_members ON usr_data.usr_id = obj_members.usr_id WHERE obj_members.obj_id = ".
2725 "(SELECT obj_id FROM object_reference WHERE ref_id = ".$ilDB->quote($ref_id, "integer").") AND ";
2726 }
2727 break;
2728 case 6:
2729 global $rbacreview;
2730 $ref_id = $_SESSION["user_filter_data"];
2731 if ($ref_id)
2732 {
2733 $local_roles = $rbacreview->getRolesOfRoleFolder($ref_id,false);
2734 if (is_array($local_roles) && count($local_roles))
2735 {
2736 $join_filter = " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE ".
2737 $ilDB->in("rbac_ua.rol_id", $local_roles, false, $local_roles)." AND ";
2738 }
2739 }
2740 break;
2741 case 7:
2742 global $rbacreview;
2743 $rol_id = $_SESSION["user_filter_data"];
2744 if ($rol_id)
2745 {
2746 $join_filter = " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE rbac_ua.rol_id = ".
2747 $ilDB->quote($rol_id, "integer")." AND ";
2748 $without_anonymous_users = false;
2749 }
2750 break;
2751 }
2752 }
2753 // This is a temporary hack to search users by their role
2754 // See Mantis #338. This is a hack due to Mantis #337.
2755 if (strtolower(substr($a_search_str, 0, 5)) == "role:")
2756 {
2757 $query = "SELECT DISTINCT usr_data.usr_id,usr_data.login,usr_data.firstname,usr_data.lastname,usr_data.email ".
2758 "FROM object_data,rbac_ua,usr_data ".
2759 "WHERE ".$ilDB->like("object_data.title", "text", "%".substr($a_search_str,5)."%").
2760 " AND object_data.type = 'role' ".
2761 "AND rbac_ua.rol_id = object_data.obj_id ".
2762 "AND usr_data.usr_id = rbac_ua.usr_id ".
2763 "AND rbac_ua.usr_id != ".$ilDB->quote(ANONYMOUS_USER_ID, "integer");
2764 }
2765 else
2766 {
2767 $query.= $join_filter.
2768 "(".$ilDB->like("usr_data.login", "text", "%".$a_search_str."%")." ".
2769 "OR ".$ilDB->like("usr_data.firstname", "text", "%".$a_search_str."%")." ".
2770 "OR ".$ilDB->like("usr_data.lastname", "text", "%".$a_search_str."%")." ".
2771 "OR ".$ilDB->like("usr_data.email", "text", "%".$a_search_str."%").") ";
2772
2773 if ($filter_settings !== FALSE && strlen($filter_settings))
2774 {
2775 switch ($filter_settings)
2776 {
2777 case 0:
2778 $query.= " AND usr_data.active = ".$ilDB->quote(0, "integer")." ";
2779 break;
2780 case 1:
2781 $query.= " AND usr_data.active = ".$ilDB->quote(1, "integer")." ";
2782 break;
2783 case 2:
2784 $query.= " AND usr_data.time_limit_unlimited = ".$ilDB->quote(0, "integer")." ";
2785 break;
2786 case 4:
2787 $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"]));
2788 $query.= " AND last_login < ".$ilDB->quote($date, "timestamp")." ";
2789 break;
2790 }
2791 }
2792
2793 if ($without_anonymous_users)
2794 {
2795 $query.= "AND usr_data.usr_id != ".$ilDB->quote(ANONYMOUS_USER_ID, "integer");
2796 }
2797
2798 if (is_numeric($active) && $active > -1 && $filter_settings === FALSE)
2799 {
2800 $query.= " AND active = ".$ilDB->quote($active, "integer")." ";
2801 }
2802
2803 }
2804 $ilLog->write($query);
2805 $res = $ilDB->query($query);
2806 while ($row = $ilDB->fetchObject($res))
2807 {
2808 $users[] = array(
2809 "usr_id" => $row->usr_id,
2810 "login" => $row->login,
2811 "firstname" => $row->firstname,
2812 "lastname" => $row->lastname,
2813 "email" => $row->email,
2814 "active" => $row->active);
2815 $ids[] = $row->usr_id;
2816 }
2817 if ($a_return_ids_only)
2818 return $ids ? $ids : array();
2819 else
2820 return $users ? $users : array();
2821 }

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

Referenced by ilObjSurveyAdministrationGUI\searchObject(), and ilObjUserTest\testSearch().

+ Here is the caller graph for this function:

◆ sendPersonalDataFile()

ilObjUser::sendPersonalDataFile ( )

Send personal data file.

Parameters

return

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

5302 {
5303 include_once("./Services/Export/classes/class.ilExport.php");
5304 $file = ilExport::_getExportDirectory($this->getId(), "xml", "usr", "personal_data").
5305 "/".$this->getPersonalDataExportFile();
5306 if (is_file($file))
5307 {
5309 }
5310 }
getPersonalDataExportFile()
Get personal data export file.
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.

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

+ Here is the call graph for this function:

◆ setActive()

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

set user active state and updates system fields appropriately @access public

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

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

2188 {
2189 $this->setOwner($a_owner);
2190
2191 if ($a_active)
2192 {
2193 $this->active = 1;
2194 $this->setApproveDate(date('Y-m-d H:i:s'));
2195 $this->setOwner($a_owner);
2196 }
2197 else
2198 {
2199 $this->active = 0;
2200 $this->setApproveDate(null);
2201 }
2202 }
setApproveDate($a_str)
set date the user account was activated null indicates that the user has not yet been activated @acce...
setOwner($a_owner)
set object owner

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

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

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

◆ setAgreeDate()

ilObjUser::setAgreeDate (   $a_str)

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

Returns
void

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

2176 {
2177 $this->agree_date = $a_str;
2178 }

◆ setApproveDate()

ilObjUser::setApproveDate (   $a_str)

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

Returns
void

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

2145 {
2146 $this->approve_date = $a_str;
2147 }

Referenced by setActive().

+ Here is the caller graph for this function:

◆ setAuthMode()

ilObjUser::setAuthMode (   $a_str)

set auth mode @access public

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

3620 {
3621 $this->auth_mode = $a_str;
3622 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setBirthday()

ilObjUser::setBirthday (   $a_birthday)

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

5083 {
5084 if (strlen($a_birthday))
5085 {
5086 $date = new ilDate($a_birthday, IL_CAL_DATE);
5087 $this->birthday = $date->get(IL_CAL_DATE);
5088 }
5089 else
5090 {
5091 $this->birthday = null;
5092 }
5093 }
const IL_CAL_DATE
Class for single dates.

References IL_CAL_DATE.

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setCaptchaVerified()

ilObjUser::setCaptchaVerified (   $a_val)

Set captcha verified.

Parameters

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

5249 {
5250 $_SESSION["user_captcha_verified"] = $a_val;
5251 }

References $_SESSION.

◆ setCity()

ilObjUser::setCity (   $a_str)

set city @access public

Parameters
stringcity

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

1724 {
1725 $this->city = $a_str;
1726 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setClientIP()

ilObjUser::setClientIP (   $a_str)

set client ip number @access public

Parameters
stringclient ip

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

1879 {
1880 $this->client_ip = $a_str;
1881 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setComment()

ilObjUser::setComment (   $a_str)

set referral comment @access public

Parameters
stringhobby

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

2125 {
2126 $this->referral_comment = $a_str;
2127 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setCountry()

ilObjUser::setCountry (   $a_str)

Set country (free text)

@access public

Parameters
stringcountry

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

1763 {
1764 $this->country = $a_str;
1765 }

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

+ Here is the caller graph for this function:

◆ setCurrentLanguage()

ilObjUser::setCurrentLanguage (   $a_val)

Set current language.

Parameters
string$a_valcurrent language

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

2081 {
2082 $_SESSION['lang'] = $a_val;
2083 }

References $_SESSION.

◆ setDelicious()

ilObjUser::setDelicious (   $a_delicious)

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

4379 {
4380 $this->delicious = $a_delicious;
4381 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setDepartment()

ilObjUser::setDepartment (   $a_str)

set department @access public

Parameters
stringdepartment

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

1686 {
1687 $this->department = $a_str;
1688 }

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

+ Here is the caller graph for this function:

◆ setDesktopItemParameters()

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

set parameters of a desktop item entry

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

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

3099 {
3100 global $ilDB;
3101
3102 $ilDB->manipulateF("UPDATE desktop_item SET parameters = %s ".
3103 " WHERE item_id = %s AND type = %s AND user_id = %s",
3104 array("text", "integer", "text", "integer"),
3105 array($a_par, $a_item_id, $a_type, $this->getId()));
3106 }

References $ilDB, and ilObject\getId().

+ Here is the call graph for this function:

◆ setDiskQuota()

ilObjUser::setDiskQuota (   $a_disk_quota)
Sets the minimal disk quota imposed by this user account.

The minimal disk quota is specified in bytes.

@access     public
@param      integer

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

1996 {
1997 $this->setPref("disk_quota",$a_disk_quota);
1998 }

References setPref().

+ Here is the call graph for this function:

◆ setEmail()

ilObjUser::setEmail (   $a_str)

set email @access public

Parameters
stringemail address

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

1934 {
1935 $this->email = $a_str;
1936 }

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

+ Here is the caller graph for this function:

◆ setExternalAccount()

ilObjUser::setExternalAccount (   $a_str)

set external account

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

@access     public

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

3647 {
3648 $this->ext_account = $a_str;
3649 }

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

+ Here is the caller graph for this function:

◆ setFax()

ilObjUser::setFax (   $a_str)

set fax @access public

Parameters
stringfax

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

1860 {
1861 $this->fax = $a_str;
1862 }

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

+ Here is the caller graph for this function:

◆ setFirstname()

ilObjUser::setFirstname (   $a_str)

set firstname @access public

Parameters
stringfirstname

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

1629 {
1630 $this->firstname = $a_str;
1631 }

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

+ Here is the caller graph for this function:

◆ setFullname()

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

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

But you may use the function in static manner. @access static

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

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

1434 {
1435 $this->fullname = "";
1436
1437 if ($a_title)
1438 {
1439 $fullname = $a_title." ";
1440 }
1441 elseif ($this->utitle)
1442 {
1443 $this->fullname = $this->utitle." ";
1444 }
1445
1446 if ($a_firstname)
1447 {
1448 $fullname .= $a_firstname." ";
1449 }
1450 elseif ($this->firstname)
1451 {
1452 $this->fullname .= $this->firstname." ";
1453 }
1454
1455 if ($a_lastname)
1456 {
1457 return $fullname.$a_lastname;
1458 }
1459
1460 $this->fullname .= $this->lastname;
1461 }

References $fullname, and $lastname.

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setGender()

ilObjUser::setGender (   $a_str)

set gender @access public

Parameters
stringgender

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

1587 {
1588 $this->gender = substr($a_str,-1);
1589 }

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

+ Here is the caller graph for this function:

◆ setGeneralInterests()

ilObjUser::setGeneralInterests ( array  $value = null)

Set general interests.

Parameters
array$value

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

5528 {
5529 $this->interests_general = $value;
5530 }

Referenced by readMultiTextFields().

+ Here is the caller graph for this function:

◆ setHobby()

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

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

1953 {
1954 $this->hobby = $a_str;
1955 }

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

+ Here is the caller graph for this function:

◆ setInactivationDate()

ilObjUser::setInactivationDate (   $inactivation_date)

setter for inactivation date

Parameters
string$inactivationDate

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

5396 {
5397 $this->inactivation_date = $inactivation_date;
5398 }

References $inactivation_date.

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setInstantMessengerId()

ilObjUser::setInstantMessengerId (   $a_im_type,
  $a_im_id 
)

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

4367 {
4368 $var = "im_".$a_im_type;
4369 $this->$var = $a_im_id;
4370 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setInstitution()

ilObjUser::setInstitution (   $a_str)

set institution @access public

Parameters
stringinstitution

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

1667 {
1668 $this->institution = $a_str;
1669 }

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

+ Here is the caller graph for this function:

◆ setIsSelfRegistered()

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

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

5508 {
5509 $this->is_self_registered = (bool) $status;
5510 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setLanguage()

ilObjUser::setLanguage (   $a_str)

set user language @access public

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

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

1972 {
1973 $this->setPref("language",$a_str);
1974 unset($_SESSION['lang']);
1975 }

References $_SESSION, and setPref().

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

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

◆ setLastLogin()

ilObjUser::setLastLogin (   $a_str)

set user's last login @access public

Parameters
stringlogin date

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

2091 {
2092 $this->last_login = $a_str;
2093 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setLastname()

ilObjUser::setLastname (   $a_str)

set lastame @access public

Parameters
stringlastname

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

1648 {
1649 $this->lastname = $a_str;
1650 }

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

+ Here is the caller graph for this function:

◆ setLastPasswordChangeToNow()

ilObjUser::setLastPasswordChangeToNow ( )

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

2410 {
2411 global $ilDB;
2412
2413 $this->setLastPasswordChangeTS( time() );
2414
2415 $query = "UPDATE usr_data SET last_password_change = %s " .
2416 "WHERE usr_id = %s";
2417 $affected = $ilDB->manipulateF($query,
2418 array('integer','integer'),
2419 array($this->getLastPasswordChangeTS(),$this->id));
2420 if($affected) return true;
2421 else return false;
2422 }

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

+ Here is the call graph for this function:

◆ setLastPasswordChangeTS()

ilObjUser::setLastPasswordChangeTS (   $a_last_password_change_ts)

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

2020 {
2021 $this->last_password_change_ts = $a_last_password_change_ts;
2022 }

Referenced by read(), and setLastPasswordChangeToNow().

+ Here is the caller graph for this function:

◆ setLastUpdate()

ilObjUser::setLastUpdate (   $a_str)

set last update of user data set @access public

Parameters
stringdate

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

2111 {
2112 $this->last_update = $a_str;
2113 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setLatitude()

ilObjUser::setLatitude (   $a_latitude)

Set Latitude.

Parameters
string$a_latitudeLatitude

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

2442 {
2443 $this->latitude = $a_latitude;
2444 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setLocationZoom()

ilObjUser::setLocationZoom (   $a_locationzoom)

Set Location Zoom.

Parameters
int$a_locationzoomLocation Zoom

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

2482 {
2483 $this->loc_zoom = $a_locationzoom;
2484 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setLogin()

ilObjUser::setLogin (   $a_str)

set login / username @access public

Parameters
stringusername

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

1535 {
1536 $this->login = $a_str;
1537 }

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

+ Here is the caller graph for this function:

◆ setLoginAttempts()

ilObjUser::setLoginAttempts (   $a_login_attempts)

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

2324 {
2325 $this->login_attempts = $a_login_attempts;
2326 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setLongitude()

ilObjUser::setLongitude (   $a_longitude)

Set Longitude.

Parameters
string$a_longitudeLongitude

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

2462 {
2463 $this->longitude = $a_longitude;
2464 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setLookingForHelp()

ilObjUser::setLookingForHelp ( array  $value = null)

Set help looking for.

Parameters
array$value

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

5588 {
5589 $this->interests_help_looking = $value;
5590 }

Referenced by readMultiTextFields().

+ Here is the caller graph for this function:

◆ setMatriculation()

ilObjUser::setMatriculation (   $a_str)

set matriculation number @access public

Parameters
stringmatriculation number

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

1898 {
1899 $this->matriculation = $a_str;
1900 }

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

+ Here is the caller graph for this function:

◆ setOfferingHelp()

ilObjUser::setOfferingHelp ( array  $value = null)

Set help offering.

Parameters
array$value

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

5558 {
5559 $this->interests_help_offered = $value;
5560 }

Referenced by readMultiTextFields().

+ Here is the caller graph for this function:

◆ setPasswd()

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

set password @access public

Parameters
stringpasswd

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

1554 {
1555 $this->passwd = $a_str;
1556 $this->passwd_type = $a_type;
1557 }

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

+ Here is the caller graph for this function:

◆ setPasswordEncodingType()

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

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

307 {
308 $this->password_encoding_type = $password_encryption_type;
309 }

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

+ Here is the caller graph for this function:

◆ setPasswordSalt()

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

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

323 {
324 $this->password_salt = $password_salt;
325 }

References $password_salt.

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

+ Here is the caller graph for this function:

◆ setPhoneHome()

ilObjUser::setPhoneHome (   $a_str)

set home phone @access public

Parameters
stringhome phone

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

1822 {
1823 $this->phone_home = $a_str;
1824 }

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

+ Here is the caller graph for this function:

◆ setPhoneMobile()

ilObjUser::setPhoneMobile (   $a_str)

set mobile phone @access public

Parameters
stringmobile phone

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

1841 {
1842 $this->phone_mobile = $a_str;
1843 }

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

+ Here is the caller graph for this function:

◆ setPhoneOffice()

ilObjUser::setPhoneOffice (   $a_str)

set office phone @access public

Parameters
stringoffice phone

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

1803 {
1804 $this->phone_office = $a_str;
1805 }

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

+ Here is the caller graph for this function:

◆ setPref()

ilObjUser::setPref (   $a_keyword,
  $a_value 
)

set a user preference

Parameters
stringname of parameter
stringvalue @access public

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

1229 {
1230 if ($a_keyword != "")
1231 {
1232 $this->prefs[$a_keyword] = $a_value;
1233 }
1234 }

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

+ Here is the caller graph for this function:

◆ setProfileIncomplete()

ilObjUser::setProfileIncomplete (   $a_prof_inc)

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

2347 {
2348 $this->profile_incomplete = (boolean) $a_prof_inc;
2349 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setSelectedCountry()

ilObjUser::setSelectedCountry (   $a_val)

Set selected country (selection drop down)

Parameters
stringselected country

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

1783 {
1784 $this->sel_country = $a_val;
1785 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setSkin()

ilObjUser::setSkin (   $a_str)

set user skin (template set) @access public

Parameters
stringdirectory name of template set

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

2277 {
2278 // TODO: exception handling (dir exists)
2279 $this->skin = $a_str;
2280 }

◆ setStreet()

ilObjUser::setStreet (   $a_str)

set street @access public

Parameters
stringstreet

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

1705 {
1706 $this->street = $a_str;
1707 }

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

+ Here is the caller graph for this function:

◆ setTimeLimitFrom()

ilObjUser::setTimeLimitFrom (   $a_from)

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

2291 {
2292 $this->time_limit_from = $a_from;
2293 }

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

+ Here is the caller graph for this function:

◆ setTimeLimitMessage()

ilObjUser::setTimeLimitMessage (   $a_time_limit_message)

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

2315 {
2316 return $this->time_limit_message = $a_time_limit_message;
2317 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setTimeLimitOwner()

ilObjUser::setTimeLimitOwner (   $a_owner)

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

2283 {
2284 $this->time_limit_owner = $a_owner;
2285 }

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

+ Here is the caller graph for this function:

◆ setTimeLimitUnlimited()

ilObjUser::setTimeLimitUnlimited (   $a_unlimited)

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

2307 {
2308 $this->time_limit_unlimited = $a_unlimited;
2309 }

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

+ Here is the caller graph for this function:

◆ setTimeLimitUntil()

ilObjUser::setTimeLimitUntil (   $a_until)

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

2299 {
2300 $this->time_limit_until = $a_until;
2301 }

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

+ Here is the caller graph for this function:

◆ setUserDefinedData()

ilObjUser::setUserDefinedData (   $a_data)

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

4076 {
4077 if(!is_array($a_data))
4078 {
4079 return false;
4080 }
4081 foreach($a_data as $field => $data)
4082 {
4083 #$new_data[$field] = ilUtil::stripSlashes($data);
4084 // Assign it directly to avoid update problems of unchangable fields
4085 $this->user_defined_data['f_'.$field] = $data;
4086 }
4087 #$this->user_defined_data = $new_data;
4088
4089 return true;
4090 }

References $data.

◆ setUTitle()

ilObjUser::setUTitle (   $a_str)

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

Parameters
stringtitle

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

1608 {
1609 $this->utitle = $a_str;
1610 }

Referenced by assignData().

+ Here is the caller graph for this function:

◆ setZipcode()

ilObjUser::setZipcode (   $a_str)

set zipcode @access public

Parameters
stringzipcode

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

1743 {
1744 $this->zipcode = $a_str;
1745 }

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

+ Here is the caller graph for this function:

◆ syncActive()

ilObjUser::syncActive ( )

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

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

2237 {
2238 global $ilAuth;
2239
2240 $storedActive = 0;
2241 if ($this->getStoredActive($this->id))
2242 {
2243 $storedActive = 1;
2244 }
2245
2246 $currentActive = 0;
2247 if ($this->active)
2248 {
2249 $currentActive = 1;
2250 }
2251
2252 if ((!empty($storedActive) && empty($currentActive)) ||
2253 (empty($storedActive) && !empty($currentActive)))
2254 {
2255 $this->setActive($currentActive, $this->getUserIdByLogin(ilObjUser::getLoginFromAuth()));
2256 }
2257 }
getUserIdByLogin($a_login)
getStoredActive($a_id)
get user active state
setActive($a_active, $a_owner=0)
set user active state and updates system fields appropriately @access public

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

+ Here is the call graph for this function:

◆ updateLogin()

ilObjUser::updateLogin (   $a_login)

update login name

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

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

986 {
987 global $ilDB, $ilSetting;
988
989 if(func_num_args() != 1)
990 {
991 return false;
992 }
993
994 if(!isset($a_login))
995 {
996 return false;
997 }
998
999 $former_login = self::_lookupLogin($this->getId());
1000
1001 // Update not necessary
1002 if(0 == strcmp($a_login, $former_login))
1003 {
1004 return false;
1005 }
1006
1007 try
1008 {
1009 $last_history_entry = ilObjUser::_getLastHistoryDataByUserId($this->getId());
1010 }
1011 catch(ilUserException $e) { $last_history_entry = null; }
1012
1013 // throw exception if the desired loginame is already in history and it is not allowed to reuse it
1014 if((int)$ilSetting->get('allow_change_loginname') &&
1015 (int)$ilSetting->get('reuse_of_loginnames') == 0 &&
1016 self::_doesLoginnameExistInHistory($a_login))
1017 {
1018 throw new ilUserException($this->lng->txt('loginname_already_exists'));
1019 }
1020 else if((int)$ilSetting->get('allow_change_loginname') &&
1021 (int)$ilSetting->get('loginname_change_blocking_time') &&
1022 is_array($last_history_entry) &&
1023 $last_history_entry[1] + (int)$ilSetting->get('loginname_change_blocking_time') > time())
1024 {
1025 include_once 'Services/Calendar/classes/class.ilDate.php';
1026 throw new ilUserException(
1027 sprintf(
1028 $this->lng->txt('changing_loginname_not_possible_info'),
1030 new ilDateTime($last_history_entry[1], IL_CAL_UNIX)),
1032 new ilDateTime(($last_history_entry[1] + (int)$ilSetting->get('loginname_change_blocking_time')), IL_CAL_UNIX))
1033 )
1034 );
1035 }
1036 else
1037 {
1038 // log old loginname in history
1039 if((int)$ilSetting->get('allow_change_loginname') &&
1040 (int)$ilSetting->get('create_history_loginname'))
1041 {
1042 ilObjUser::_writeHistory($this->getId(), $former_login);
1043 }
1044
1045 //update login
1046 $this->login = $a_login;
1047
1048 $ilDB->manipulateF('
1049 UPDATE usr_data
1050 SET login = %s
1051 WHERE usr_id = %s',
1052 array('text', 'integer'), array($this->getLogin(), $this->getId()));
1053
1054 include_once 'Services/Contact/classes/class.ilAddressbook.php';
1055 ilAddressbook::onLoginNameChange($former_login, $this->getLogin());
1056 }
1057
1058 return true;
1059 }
const IL_CAL_UNIX
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
static _getLastHistoryDataByUserId($a_usr_id)
Returns the last used loginname and the changedate of the passed user_id.
static _writeHistory($a_usr_id, $a_login)

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

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

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

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

+ Here is the call graph for this function:

◆ updateUserDefinedFields()

ilObjUser::updateUserDefinedFields ( )

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

4098 {
4099 global $ilDB;
4100
4101 $fields = '';
4102
4103 $field_def = array();
4104
4105 include_once("./Services/User/classes/class.ilUserDefinedData.php");
4106 $udata = new ilUserDefinedData($this->getId());
4107
4108 foreach($this->user_defined_data as $field => $value)
4109 {
4110 if($field != 'usr_id')
4111 {
4112// $field_def[$field] = array('text',$value);
4113 $udata->set($field, $value);
4114 }
4115 }
4116 $udata->update();
4117
4118/* if(!$field_def)
4119 {
4120 return true;
4121 }
4122
4123 $query = "SELECT usr_id FROM udf_data WHERE usr_id = ".$ilDB->quote($this->getId(),'integer');
4124 $res = $ilDB->query($query);
4125
4126
4127 if($res->numRows())
4128 {
4129 // Update
4130 $ilDB->update('udf_data',$field_def,array('usr_id' => array('integer',$this->getId())));
4131 }
4132 else
4133 {
4134 $field_def['usr_id'] = array('integer',$this->getId());
4135 $ilDB->insert('udf_data',$field_def);
4136 }
4137*/
4138 return true;
4139 }

References $ilDB, and ilObject\getId().

+ Here is the call graph for this function:

◆ userExists()

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

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

5223 {
5224 global $ilDB;
5225
5226 $query = 'SELECT count(*) num FROM object_data od '.
5227 'JOIN usr_data ud ON obj_id = usr_id '.
5228 'WHERE '.$ilDB->in('obj_id',$a_usr_ids,false,'integer').' ';
5229 $res = $ilDB->query($query);
5230 $num_rows =$res->fetchRow(DB_FETCHMODE_OBJECT)->num;
5231 return $num_rows == count((array) $a_usr_ids);
5232 }

References $ilDB, $query, $res, and DB_FETCHMODE_OBJECT.

Referenced by ilInfoScreenGUI\addObjectSections().

+ Here is the caller graph for this function:

◆ writeAccepted()

ilObjUser::writeAccepted ( )

write accept date of user agreement to db

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

684 {
685 global $ilDB;
686
687 $ilDB->manipulateF("UPDATE usr_data SET agree_date = ".$ilDB->now().
688 " WHERE usr_id = %s", array("integer"), array($this->getId()));
689 }

References $ilDB, and ilObject\getId().

Referenced by ilTermsOfServiceHelper\trackAcceptance().

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

◆ writePref()

ilObjUser::writePref (   $a_keyword,
  $a_value 
)

write userpref to user table @access private

Parameters
stringkeyword
stringvalue

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

1068 {
1069 self::_writePref($this->id, $a_keyword, $a_value);
1070 $this->setPref($a_keyword, $a_value);
1071 }

References _writePref(), and setPref().

Referenced by activateDeletionFlag(), and removeDeletionFlag().

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

◆ writePrefs()

ilObjUser::writePrefs ( )

write all userprefs @access private

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

1152 {
1153 global $ilDB;
1154
1155 ilObjUser::_deleteAllPref($this->id);
1156 foreach ($this->prefs as $keyword => $value)
1157 {
1158 self::_writePref($this->id, $keyword, $value);
1159 }
1160 }

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

+ Here is the call graph for this function:

Field Documentation

◆ $active

◆ $agree_date

ilObjUser::$agree_date = null

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

Referenced by getAgreeDate().

◆ $approve_date

ilObjUser::$approve_date = null

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

Referenced by getApproveDate().

◆ $auth_mode

ilObjUser::$auth_mode

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

Referenced by getAuthMode().

◆ $birthday

ilObjUser::$birthday
protected

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

Referenced by getBirthday().

◆ $city

ilObjUser::$city

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

Referenced by getCity().

◆ $client_ip

ilObjUser::$client_ip

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

Referenced by getClientIP().

◆ $country

ilObjUser::$country

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

Referenced by getCountry().

◆ $default_role

ilObjUser::$default_role

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

◆ $delicious

ilObjUser::$delicious

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

Referenced by getDelicious().

◆ $department

ilObjUser::$department

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

Referenced by getDepartment().

◆ $email

ilObjUser::$email

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

Referenced by getEmail().

◆ $fax

ilObjUser::$fax

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

Referenced by getFax().

◆ $firstname

ilObjUser::$firstname

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

Referenced by getFirstname().

◆ $fullname

ilObjUser::$fullname

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

Referenced by _lookupFullname(), and setFullname().

◆ $gender

ilObjUser::$gender

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

Referenced by getGender().

◆ $hobby

ilObjUser::$hobby

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

Referenced by getHobby().

◆ $ilias

ilObjUser::$ilias

◆ $im_aim

ilObjUser::$im_aim

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

◆ $im_icq

ilObjUser::$im_icq

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

◆ $im_jabber

ilObjUser::$im_jabber

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

◆ $im_msn

ilObjUser::$im_msn

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

◆ $im_skype

ilObjUser::$im_skype

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

◆ $im_voip

ilObjUser::$im_voip

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

◆ $im_yahoo

ilObjUser::$im_yahoo

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

◆ $inactivation_date

ilObjUser::$inactivation_date = null
protected

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

Referenced by getInactivationDate(), and setInactivationDate().

◆ $institution

ilObjUser::$institution

Definition at line 77 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 146 of file class.ilObjUser.php.

◆ $is_desktop_item_loaded

ilObjUser::$is_desktop_item_loaded
static

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

◆ $is_self_registered

ilObjUser::$is_self_registered = false
private

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

Referenced by isSelfRegistered().

◆ $last_password_change_ts

ilObjUser::$last_password_change_ts

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

Referenced by getLastPasswordChangeTS().

◆ $lastname

ilObjUser::$lastname

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

Referenced by getLastname(), and setFullname().

◆ $latitude

ilObjUser::$latitude

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

Referenced by getLatitude().

◆ $loc_zoom

ilObjUser::$loc_zoom

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

Referenced by getLocationZoom().

◆ $login

ilObjUser::$login

all user related data in single vars @access public

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

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

◆ $login_attempts

ilObjUser::$login_attempts

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

Referenced by _getLoginAttempts(), and getLoginAttempts().

◆ $longitude

ilObjUser::$longitude

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

Referenced by getLongitude().

◆ $matriculation

ilObjUser::$matriculation

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

Referenced by getMatriculation().

◆ $passwd

ilObjUser::$passwd
protected

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

Referenced by getPasswd().

◆ $passwd_type

ilObjUser::$passwd_type
protected

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

Referenced by getPasswdType().

◆ $password_encoding_type

ilObjUser::$password_encoding_type
protected

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

Referenced by getPasswordEncodingType().

◆ $password_salt

ilObjUser::$password_salt = null
protected

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

Referenced by getPasswordSalt(), and setPasswordSalt().

◆ $personal_image_cache

ilObjUser::$personal_image_cache = array()
staticprotected

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

◆ $phone_home

ilObjUser::$phone_home

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

Referenced by getPhoneHome().

◆ $phone_mobile

ilObjUser::$phone_mobile

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

Referenced by getPhoneMobile().

◆ $phone_office

ilObjUser::$phone_office

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

Referenced by getPhoneOffice().

◆ $prefs

ilObjUser::$prefs

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

Referenced by _getPreferences(), and readPrefs().

◆ $referral_comment

ilObjUser::$referral_comment

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

Referenced by getComment().

◆ $sel_country

ilObjUser::$sel_country

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

Referenced by getSelectedCountry().

◆ $skin

ilObjUser::$skin

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

Referenced by __construct().

◆ $street

ilObjUser::$street

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

Referenced by getStreet().

◆ $user_defined_data

ilObjUser::$user_defined_data = array()

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

◆ $utitle

ilObjUser::$utitle

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

Referenced by getUTitle().

◆ $zipcode

ilObjUser::$zipcode

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

Referenced by getZipcode().


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