ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjUser Class Reference
+ Inheritance diagram for ilObjUser:
+ Collaboration diagram for ilObjUser:

Public Member Functions

 __construct ($a_user_id=0, $a_call_by_reference=false)
 Constructor public.
 read ()
 loads a record "user" from database private
 getPasswordEncodingType ()
 setPasswordEncodingType ($password_encryption_type)
 getPasswordSalt ()
 setPasswordSalt ($password_salt)
 assignData ($a_data)
 loads a record "user" from array public
 writeAccepted ()
 write accept date of user agreement to db
 _lookupFullname ($a_user_id)
 Lookup Full Name.
 _lookupIm ($a_user_id, $a_type)
 Lookup IM.
 _lookupEmail ($a_user_id)
 Lookup email.
 _lookupClientIP ($a_user_id)
 Lookup client ip.
 _lookupFields ($a_user_id)
 lookup fields (deprecated; use more specific methods instead)
 _lookupLogin ($a_user_id)
 lookup login
 _lookupExternalAccount ($a_user_id)
 lookup external account for login and authmethod
 _lookupLastLogin ($a_user_id)
 lookup last login
 refreshLogin ()
 updates the login data of a "user" // TODO set date with now() should be enough public
 updateLogin ($a_login)
 update login name
 writePref ($a_keyword, $a_value)
 write userpref to user table private
 deletePref ($a_keyword)
 Deletes a userpref value of the user from the database public.
 _deleteAllPref ($a_user_id)
 Deletes a userpref value of the user from the database public.
 writePrefs ()
 write all userprefs private
 getTimeZone ()
 get timezone of user
 getTimeFormat ()
 get time format
 getDateFormat ()
 get date format
 setPref ($a_keyword, $a_value)
 set a user preference
 getPref ($a_keyword)
 get a user preference
 _lookupPref ($a_usr_id, $a_keyword)
 readPrefs ()
 get all user preferences private
 delete ()
 deletes a user public
 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.
 getFullname ($a_max_strlen=0)
 get fullname public
 setLogin ($a_str)
 set login / username public
 getLogin ()
 get login / username public
 setPasswd ($a_str, $a_type=IL_PASSWD_PLAIN)
 set password public
 getPasswd ()
 get password
 getPasswdType ()
 get password type
 setGender ($a_str)
 set gender public
 getGender ()
 get gender public
 setUTitle ($a_str)
 set user title (note: don't mix up this method with setTitle() that is derived from ilObject and sets the user object's title) public
 getUTitle ()
 get user title (note: don't mix up this method with getTitle() that is derived from ilObject and gets the user object's title) public
 setFirstname ($a_str)
 set firstname public
 getFirstname ()
 get firstname public
 setLastname ($a_str)
 set lastame public
 getLastname ()
 get lastname public
 setInstitution ($a_str)
 set institution public
 getInstitution ()
 get institution public
 setDepartment ($a_str)
 set department public
 getDepartment ()
 get department public
 setStreet ($a_str)
 set street public
 getStreet ()
 get street public
 setCity ($a_str)
 set city public
 getCity ()
 get city public
 setZipcode ($a_str)
 set zipcode public
 getZipcode ()
 get zipcode public
 setCountry ($a_str)
 Set country (free text)
 getCountry ()
 Get country (free text)
 setSelectedCountry ($a_val)
 Set selected country (selection drop down)
 getSelectedCountry ()
 Get selected country (selection drop down)
 setPhoneOffice ($a_str)
 set office phone public
 getPhoneOffice ()
 get office phone public
 setPhoneHome ($a_str)
 set home phone public
 getPhoneHome ()
 get home phone public
 setPhoneMobile ($a_str)
 set mobile phone public
 getPhoneMobile ()
 get mobile phone public
 setFax ($a_str)
 set fax public
 getFax ()
 get fax public
 setClientIP ($a_str)
 set client ip number public
 getClientIP ()
 get client ip number public
 setMatriculation ($a_str)
 set matriculation number public
 getMatriculation ()
 get matriculation number public
 setEmail ($a_str)
 set email public
 getEmail ()
 get email address public
 setHobby ($a_str)
 set hobby public
 getHobby ()
 get hobby public
 setLanguage ($a_str)
 set user language public
 getLanguage ()
 returns a 2char-language-string public
 setDiskQuota ($a_disk_quota)
 Sets the minimal disk quota imposed by this user account.
 getDiskQuota ()
 Returns the minimal disk quota imposed by this user account.
 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!)
 setCurrentLanguage ($a_val)
 Set current language.
 setLastLogin ($a_str)
 set user's last login public
 getLastLogin ()
 returns last login date public
 setLastUpdate ($a_str)
 set last update of user data set public
 getLastUpdate ()
 setComment ($a_str)
 set referral comment public
 getComment ()
 get referral comment public
 setApproveDate ($a_str)
 set date the user account was activated null indicates that the user has not yet been activated public
 getApproveDate ()
 get the date when the user account was approved public
 getAgreeDate ()
 get the date when the user accepted the user agreement public
 setAgreeDate ($a_str)
 set date the user account was accepted by the user nullindicates that the user has not accepted his account public
 setActive ($a_active, $a_owner=0)
 set user active state and updates system fields appropriately public
 getActive ()
 get user active state public
 _lookupActive ($a_usr_id)
 Check user account active.
 syncActive ()
 synchronizes current and stored user active values for the owner value to be set correctly, this function should only be called when an admin is approving a user account public
 getStoredActive ($a_id)
 get user active state
 setSkin ($a_str)
 set user skin (template set) public
 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.
 getLatitude ()
 Get Latitude.
 setLongitude ($a_longitude)
 Set Longitude.
 getLongitude ()
 Get Longitude.
 setLocationZoom ($a_locationzoom)
 Set Location Zoom.
 getLocationZoom ()
 Get Location Zoom.
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
 _getAllUserAssignedStyles ()
 skins and styles
 _moveUsersToStyle ($a_from_skin, $a_from_style, $a_to_skin, $a_to_style)
 skins and styles
 addDesktopItem ($a_item_id, $a_type, $a_par="")
 add an item to user's personal desktop
 setDesktopItemParameters ($a_item_id, $a_type, $a_par)
 set parameters of a desktop item entry
 dropDesktopItem ($a_item_id, $a_type)
 drop an item from user's personal desktop
 isDesktopItem ($a_item_id, $a_type)
 check wether an item is on the users desktop or not
 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
 addToPCClipboard ($a_content, $a_time, $a_nr)
 Add a page content item to PC clipboard (should go to another class)
 getPCClipboardContent ()
 Add a page content item to PC clipboard (should go to another class)
 clipboardHasObjectsOfType ($a_type)
 Check whether clipboard has objects of a certain type.
 clipboardDeleteObjectsOfType ($a_type)
 Delete objects of type for user.
 clipboardDeleteAll ()
 Delete objects of type for user.
 getClipboardObjects ($a_type="", $a_top_nodes_only=false)
 get all clipboard objects of user and specified type
 getClipboardChilds ($a_parent, $a_insert_time)
 Get childs of an item.
 _getUsersForClipboadObject ($a_type, $a_id)
 get all users, that have a certain object within their clipboard
 removeObjectFromClipboard ($a_item_id, $a_type)
 remove object from user's personal clipboard
 _getImportedUserId ($i2_id)
 setAuthMode ($a_str)
 set auth mode public
 getAuthMode ($a_auth_key=false)
 get auth mode public
 setExternalAccount ($a_str)
 set external account
 getExternalAccount ()
 get external account
 _getNumberOfUsersPerAuthMode ()
 get number of users per auth mode
 _getLocalAccountsForEmail ($a_email)
 check whether external account and authentication method matches with a user
 _uploadPersonalPicture ($tmp_file, $obj_id)
 Create a personal picture image file from a temporary image file.
 getPersonalPicturePath ($a_size="small", $a_force_pic=false)
 Get path to personal picture.
 removeUserPicture ($a_do_update=true)
 Remove user picture.
 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.
 _getFeedPass ($a_user_id)
 Lookup news feed password for user.
 _setFeedPass ($a_user_id, $a_password)
 Set news feed password for user.
 hasPublicProfile ()
 returns true if public is profile, false otherwise
 getPublicName ()
 returns firstname lastname and login if profile is public, login otherwise
 setBirthday ($a_birthday)
 getBirthday ()
 resetOwner ()
 isCaptchaVerified ()
 Is user captcha verified?
 setCaptchaVerified ($a_val)
 Set captcha verified.
 exportPersonalData ()
 Export personal data.
 getPersonalDataExportFile ()
 Get personal data export file.
 sendPersonalDataFile ()
 Send personal data file.
 importPersonalData ($a_file, $a_profile_data, $a_settings, $a_bookmarks, $a_notes, $a_calendar)
 Import personal data.
 setInactivationDate ($inactivation_date)
 setter for inactivation date
 getInactivationDate ()
 getter for inactivation date
 hasToAcceptTermsOfServiceInSession ($status=null)
 isAnonymous ()
 activateDeletionFlag ()
 removeDeletionFlag ()
 hasDeletionFlag ()
 setIsSelfRegistered ($status)
 isSelfRegistered ()
 setGeneralInterests (array $value=null)
 Set general interests.
 getGeneralInterests ()
 Get general interests.
 getGeneralInterestsAsText ()
 Get general interests as plain text.
 setOfferingHelp (array $value=null)
 Set help offering.
 getOfferingHelp ()
 Get help offering.
 getOfferingHelpAsText ()
 Get help offering as plain text.
 setLookingForHelp (array $value=null)
 Set help looking for.
 getLookingForHelp ()
 Get help looking for.
 getLookingForHelpAsText ()
 Get help looking for as plain text.
 updateMultiTextFields ($a_create=false)
 Write multi-text values to DB.
- Public Member Functions inherited from ilObject
 ilObject ($a_id=0, $a_reference=true)
 Constructor public.
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not)
 read ($a_force_db=false)
 read object data from db into object
 getId ()
 get object id public
 setId ($a_id)
 set object id public
 setRefId ($a_id)
 set reference id public
 getRefId ()
 get reference id public
 getType ()
 get object type public
 setType ($a_type)
 set object type public
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions
 getTitle ()
 get object title public
 getUntranslatedTitle ()
 get untranslated object title public
 setTitle ($a_title)
 set object title
 getDescription ()
 get object description
 setDescription ($a_desc)
 set object description
 getLongDescription ()
 get object long description (stored in object_description)
 getImportId ()
 get import id
 setImportId ($a_import_id)
 set import id
 getOwner ()
 get object owner
 getOwnerName ()
 _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id
 setOwner ($a_owner)
 set object owner
 getCreateDate ()
 get create date public
 getLastUpdateDate ()
 get last update date public
 getDiskUsage ()
 Gets the disk usage of the object in bytes.
 setObjDataRecord ($a_record)
 set object_data record (note: this method should only be called from the ilObjectFactory class)
 create ()
 create
 update ()
 update object in db
 MDUpdateListener ($a_element)
 Meta data update listener.
 createMetaData ()
 create meta data entry
 updateMetaData ()
 update meta data entry
 deleteMetaData ()
 delete meta data entry
 updateOwner ()
 update owner of object in db
 _getIdForImportId ($a_import_id)
 get current object id for import id (static)
 _lookupOwner ($a_id)
 lookup object owner
 _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update
 _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects.
 _setDeletedDate ($a_ref_id)
 only called in ilTree::saveSubTree
 _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes
 _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes
 _writeTitle ($a_obj_id, $a_title)
 write title to db (static)
 _writeDescription ($a_obj_id, $a_desc)
 write description to db (static)
 _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static)
 _isInTrash ($a_ref_id)
 checks wether object is in trash
 _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash
 _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!?
 setPermissions ($a_parent_ref)
 set permissions of object
 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.
 createReference ()
 creates reference for object
 countReferences ()
 count references of object
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public
 applyDidacticTemplate ($a_tpl_id)
 Apply template.
 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.
 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 ...
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container.
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies.
 cloneMetaData ($target_obj)
 Copy meta data.
 _lookupCreationDate ($a_id)
 Lookup creation date.

Static Public Member Functions

static _lookupGender ($a_user_id)
 Lookup gender.
static _lookupName ($a_user_id)
 lookup user name
static _lookupId ($a_user_str)
 lookup id by login
static _doesLoginnameExistInHistory ($a_login)
 Checks wether the passed loginname already exists in history.
static _getLastHistoryDataByUserId ($a_usr_id)
 Returns the last used loginname and the changedate of the passed user_id.
static _writePref ($a_usr_id, $a_keyword, $a_value)
static lookupMatriculation ($a_usr_id)
 Lookup matriculation.
static _lookupLanguage ($a_usr_id)
static hasActiveSession ($a_user_id)
 Check for simultaneous login.
 _getUserIdsByEmail ($a_email)
 STATIC METHOD get all user_ids of an email address.
 getUserIdByEmail ($a_email)
 STATIC METHOD get the user_id of an email address.
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.
 _getAllUserLogins (&$ilias)
 STATIC METHOD get all user logins.
static _readUsersProfileData ($a_user_ids)
 STATIC METHOD get user data of selected users.
 _getAllUserData ($a_fields=NULL, $active=-1)
 STATIC METHOD get all user data.
static _addDesktopItem ($a_usr_id, $a_item_id, $a_type, $a_par="")
 add an item to user's personal desktop
static _dropDesktopItem ($a_usr_id, $a_item_id, $a_type)
 drop an item from user's personal desktop
static _removeItemFromDesktops ($a_id)
 removes object from all user's desktops public
static _isDesktopItem ($a_usr_id, $a_item_id, $a_type)
 check wether an item is on the users desktop or not
static preloadIsDesktopItem ($a_usr_id, $a_item_ids)
 Preload desktop item information.
static _lookupDesktopItems ($user_id, $a_types="")
 get all desktop items of user and specified type
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.
static _toggleActiveStatusOfUsers ($a_usr_ids, $a_status)
 Toggle active status of users.
static _lookupAuthMode ($a_usr_id)
 lookup auth mode
static _checkExternalAuthAccount ($a_auth, $a_account)
 check whether external account and authentication method matches with a user
static _getPersonalPicturePath ($a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false)
 Get path to personal picture.
static copyProfilePicturesToDirectory ($a_user_id, $a_dir)
 Get profile picture direcotory.
static _loginExists ($a_login, $a_user_id=0)
 check if a login name already exists You may exclude a user from the check by giving his user id as 2nd paramter public static
static _externalAccountExists ($a_external_account, $a_auth_mode)
 Check if an external account name already exists.
static _getUsersForRole ($role_id, $active=-1)
 return array of complete users which belong to a specific role
static _getUsersForFolder ($ref_id, $active)
 get users for a category or from system folder
static _getUsersForGroup ($a_mem_ids, $active=-1)
 return user data for group members
static _getUsersForIds ($a_mem_ids, $active=-1, $timelimitowner=-1)
 return user data for given user id
static _getUserData ($a_internalids)
 return user data for given user ids
static _getPreferences ($user_id)
 get preferences for user
static _resetLoginAttempts ($a_usr_id)
static _getLoginAttempts ($a_usr_id)
static _incrementLoginAttempts ($a_usr_id)
static _setUserInactive ($a_usr_id)
static _writeHistory ($a_usr_id, $a_login)
static _getAssociatedUsersOnline ($a_user_id, $a_no_anonymous=false)
 
reads all active sessions from db and returns users that are online
and who have a local role in a group or a course for which the

the current user has also a local role.

static _generateRegistrationHash ($a_usr_id)
 Generates a unique hashcode for activating a user profile after registration.
static _verifyRegistrationHash ($a_hash)
 Verifies a registration hash.
static _getUserIdsByInactivityPeriod ($period)
 get ids of all users that have been inactive for at least the given period
static _getUserIdsByInactivationPeriod ($period)
 get ids of all users that have been inactivated since at least the given period
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.
static getFirstLettersOfLastnames ()
 Get first letters of all lastnames.
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
static _lookupTitle ($a_id)
 lookup object title
static _getIdsForTitle ($title, $type= '', $partialmatch=false)
static _lookupDescription ($a_id)
 lookup object description
static _lookupObjId ($a_id)
static setDeletedDates ($a_ref_ids)
 Set deleted date type $ilDB.
static _lookupType ($a_id, $a_reference=false)
 lookup object type
static _lookupObjectId ($a_ref_id)
 lookup object id
static _exists ($a_id, $a_reference=false, $a_type=null)
 checks if an object exists in object_data
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type.
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection.
static _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 Get icon for repository item.
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies.
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies.
static getLongDescriptions (array $a_obj_ids)
 Get long description data.
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns.
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course.

Data Fields

 $login
 all user related data in single vars public
 $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
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

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.
 readMultiTextFields ()
 Fetch multi-text values from DB.
 deleteMultiTextFields ()
 Remove multi-text values from DB.

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.

Static Private Member Functions

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

Private Attributes

 $is_self_registered = false

Detailed Description

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

Constructor & Destructor Documentation

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

Constructor public.

Parameters
integeruser_id

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

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

{
global $ilias,$ilDB;
// init variables
$this->ilias =& $ilias;
$this->db =& $ilDB;
$this->type = "usr";
parent::__construct($a_user_id, $a_call_by_reference);
$this->auth_mode = "default";
$this->passwd_type = IL_PASSWD_PLAIN;
// for gender selection. don't change this
/*$this->gender = array(
'm' => "salutation_m",
'f' => "salutation_f"
);*/
if ($a_user_id > 0)
{
$this->setId($a_user_id);
$this->read();
}
else
{
// TODO: all code in else-structure doesn't belongs in class user !!!
//load default data
$this->prefs = array();
//language
$this->prefs["language"] = $this->ilias->ini->readVariable("language","default");
//skin and pda support
$this->skin = $this->ilias->ini->readVariable("layout","skin");
$this->prefs["skin"] = $this->skin;
$this->prefs["show_users_online"] = "y";
//style (css)
$this->prefs["style"] = $this->ilias->ini->readVariable("layout","style");
}
}

+ Here is the call graph for this function:

Member Function Documentation

ilObjUser::__readAppliedUsers (   $a_parent_id)

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

References $ilDB, $res, and $row.

Referenced by getAppliedUsers(), and isChild().

{
global $ilDB;
$res = $ilDB->queryF("SELECT usr_id FROM usr_data ".
"WHERE time_limit_owner = %s",
array("integer"),
array($a_parent_id));
while ($row = $ilDB->fetchObject($res))
{
$this->applied_users[] = $row->usr_id;
// recursion
$this->__readAppliedUsers($row->usr_id);
}
return true;
}

+ Here is the caller graph for this function:

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.

References $ilDB, and ilCalendarCategories\deletePDItemsCache().

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

{
global $ilDB;
$item_set = $ilDB->queryF("SELECT * FROM desktop_item WHERE ".
"item_id = %s AND type = %s AND user_id = %s",
array("integer", "text", "integer"),
array($a_item_id, $a_type, $a_usr_id));
// only insert if item is not already on desktop
if (!$ilDB->fetchAssoc($item_set))
{
$ilDB->manipulateF("INSERT INTO desktop_item (item_id, type, user_id, parameters) VALUES ".
" (%s,%s,%s,%s)", array("integer", "text", "integer", "text"),
array($a_item_id,$a_type,$a_usr_id,$a_par));
}
include_once './Services/Calendar/classes/class.ilCalendarCategories.php';
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

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

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

{
global $ilDB,$ilSetting;
// Check directly with auth_mode
$r = $ilDB->queryF("SELECT * FROM usr_data WHERE ".
" ext_account = %s AND auth_mode = %s",
array("text", "text"),
array($a_account, $a_auth));
if ($usr = $ilDB->fetchAssoc($r))
{
return $usr["login"];
}
// For compatibility, check for login (no ext_account entry given)
$res = $ilDB->queryF("SELECT login FROM usr_data ".
"WHERE login = %s AND auth_mode = %s",
array("text", "text"),
array($a_account, $a_auth));
if($usr = $ilDB->fetchAssoc($res))
{
return $usr['login'];
}
// If auth_default == $a_auth => check for login
if(ilAuthUtils::_getAuthModeName($ilSetting->get('auth_mode')) == $a_auth)
{
$res = $ilDB->queryF("SELECT login FROM usr_data WHERE ".
" ext_account = %s AND auth_mode = %s",
array("text", "text"),
array($a_account, "default"));
if ($usr = $ilDB->fetchAssoc($res))
{
return $usr["login"];
}
// Search for login (no ext_account given)
$res = $ilDB->queryF("SELECT login FROM usr_data ".
"WHERE login = %s AND (ext_account IS NULL OR ext_account = '') AND auth_mode = %s",
array("text", "text"),
array($a_account, "default"));
if($usr = $ilDB->fetchAssoc($res))
{
return $usr["login"];
}
}
return false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::_deleteAllPref (   $a_user_id)

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

Parameters
stringkeyword

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

References $ilDB.

Referenced by delete(), and writePrefs().

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

+ Here is the caller graph for this function:

static ilObjUser::_doesLoginnameExistInHistory (   $a_login)
static

Checks wether the passed loginname already exists in history.

public

Parameters
string$a_loginLoginname
Returns
boolean true or false

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

References $ilDB, and $res.

Referenced by ilAccountRegistrationGUI\saveForm(), and updateLogin().

{
global $ilDB;
$res = $ilDB->queryF('
SELECT * FROM loginname_history
WHERE login = %s',
array('text'), array($a_login));
return $ilDB->fetchAssoc($res) ? true : false;
}

+ Here is the caller graph for this function:

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.

References $ilDB, and ilCalendarCategories\deletePDItemsCache().

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

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Check if an external account name already exists.

public

Parameters
stringexternal account
stringauth mode

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

References $ilDB, and $res.

Referenced by ilObjUserTest\testAuthAndEmailMethods().

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

+ Here is the caller graph for this function:

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.

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

{
global $ilDB;
do
{
$continue = false;
$hashcode = substr(md5(uniqid(rand(), true)), 0, 16);
$res = $ilDB->queryf('
SELECT COUNT(usr_id) cnt FROM usr_data
WHERE reg_hash = %s',
array('text'),
array($hashcode));
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
if($row->cnt > 0) $continue = true;
break;
}
if($continue) continue;
$ilDB->manipulateF('
UPDATE usr_data
SET reg_hash = %s
WHERE usr_id = %s',
array('text', 'integer'),
array($hashcode, (int)$a_usr_id)
);
break;
} while(true);
return $hashcode;
}
ilObjUser::_getAllUserAssignedStyles ( )

skins and styles

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

References $ilDB.

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

{
global $ilDB;
$q = "SELECT DISTINCT up1.value style, up2.value skin FROM usr_pref up1, usr_pref up2 ".
" WHERE up1.keyword = ".$ilDB->quote("style", "text").
" AND up2.keyword = ".$ilDB->quote("skin", "text").
" AND up1.usr_id = up2.usr_id";
$sty_set = $ilDB->query($q);
$styles = array();
while($sty_rec = $ilDB->fetchAssoc($sty_set))
{
$styles[] = $sty_rec["skin"].":".$sty_rec["style"];
}
return $styles;
}

+ Here is the caller graph for this function:

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

STATIC METHOD get all user data.

Parameters
arraydesired columns
Returns
array of user data public

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

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

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

{
global $ilDB;
$result_arr = array();
$types = array();
$values = array();
if ($a_fields !== NULL and is_array($a_fields))
{
if (count($a_fields) == 0)
{
$select = "*";
}
else
{
if (($usr_id_field = array_search("usr_id",$a_fields)) !== false)
unset($a_fields[$usr_id_field]);
$select = implode(",",$a_fields).",usr_data.usr_id";
// online time
if(in_array('online_time',$a_fields))
{
$select .= ",ut_online.online_time ";
}
}
$q = "SELECT ".$select." FROM usr_data ";
// Add online_time if desired
// Need left join here to show users that never logged in
if(in_array('online_time',$a_fields))
{
$q .= "LEFT JOIN ut_online ON usr_data.usr_id = ut_online.usr_id ";
}
switch ($active)
{
case 0:
case 1:
$q .= "WHERE active = ".$ilDB->quote($active, "integer");
break;
case 2:
$q .= "WHERE time_limit_unlimited= ".$ilDB->quote(0, "integer");;
break;
case 3:
$qtemp = $q . ", rbac_ua, object_data WHERE rbac_ua.rol_id = object_data.obj_id AND ".
$ilDB->like("object_data.title", "text", "%crs%")." AND usr_data.usr_id = rbac_ua.usr_id";
$r = $ilDB->query($qtemp);
$course_users = array();
while ($row = $ilDB->fetchAssoc($r))
{
array_push($course_users, $row["usr_id"]);
}
if (count($course_users))
{
$q .= " WHERE ".$ilDB->in("usr_data.usr_id", $course_users, true, "integer")." ";
}
else
{
return $result_arr;
}
break;
case 4:
$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"]));
$q.= " AND last_login < ".$ilDB->quote($date, "timestamp");
break;
case 5:
$ref_id = $_SESSION["user_filter_data"];
if ($ref_id)
{
$q .= " LEFT JOIN obj_members ON usr_data.usr_id = obj_members.usr_id ".
"WHERE obj_members.obj_id = (SELECT obj_id FROM object_reference ".
"WHERE ref_id = ".$ilDB->quote($ref_id, "integer").") ";
}
break;
case 6:
global $rbacreview;
$ref_id = $_SESSION["user_filter_data"];
if ($ref_id)
{
$local_roles = $rbacreview->getRolesOfRoleFolder($ref_id,false);
if (is_array($local_roles) && count($local_roles))
{
$q.= " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE ".
$ilDB->in("rbac_ua.rol_id", $local_roles, false, "integer")." ";
}
}
break;
case 7:
$rol_id = $_SESSION["user_filter_data"];
if ($rol_id)
{
$q .= " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE rbac_ua.rol_id = ".
$ilDB->quote($rol_id, "integer");
}
break;
}
$r = $ilDB->query($q);
while ($row = $ilDB->fetchAssoc($r))
{
$result_arr[] = $row;
}
}
return $result_arr;
}

+ Here is the caller graph for this function:

ilObjUser::_getAllUserLogins ( $ilias)
static

STATIC METHOD get all user logins.

Parameters
iliasobject
Returns
array of logins public

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

References $ilDB, $res, and $row.

Referenced by ilMail\__checkSystemRecipients().

{
global $ilDB;
$res = $ilDB->query("SELECT login FROM usr_data");
while($row = $ilDB->fetchObject($res))
{
$logins[] = $row->login;
}
return $logins ? $logins : array();
}

+ Here is the caller graph for this function:

static ilObjUser::_getAssociatedUsersOnline (   $a_user_id,
  $a_no_anonymous = false 
)
static

reads all active sessions from db and returns users that are online
and who have a local role in a group or a course for which the

the current user has also a local role.

Parameters
integeruser_id User ID of the current user.
Returns
array

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

References $ilDB, $ilias, and $row.

Referenced by ilUtil\getAssociatedUsersOnline().

{
global $ilias, $ilDB;
$pd_set = new ilSetting("pd");
$atime = $pd_set->get("user_activity_time") * 60;
$ctime = time();
$no_anonym = ($a_no_anonymous)
? "AND user_id <> ".$ilDB->quote(ANONYMOUS_USER_ID, "integer")." "
: "";
// Get a list of object id's of all courses and groups for which
// the current user has local roles.
// Note: we have to use DISTINCT here, because a user may assume
// multiple roles in a group or a course.
$q = "SELECT DISTINCT dat.obj_id as obj_id ".
"FROM rbac_ua ua ".
"JOIN rbac_fa fa ON fa.rol_id = ua.rol_id ".
"JOIN object_reference r1 ON r1.ref_id = fa.parent ".
"JOIN tree ON tree.child = r1.ref_id ".
"JOIN object_reference r2 ON r2.ref_id = tree.child ". // #17674 - rolf is gone
"JOIN object_data dat ON dat.obj_id = r2.obj_id ".
"WHERE ua.usr_id = ".$ilDB->quote($a_user_id, "integer")." ".
"AND fa.assign = ".$ilDB->quote("y", "text")." ".
"AND dat.type IN (".$ilDB->quote("crs", "text").",".
$ilDB->quote("grp", "text").")";
$r = $ilDB->query($q);
while ($row = $ilDB->fetchAssoc($r))
{
$groups_and_courses_of_user[] = $row["obj_id"];
}
require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
$tos_condition = '';
if(ilTermsOfServiceHelper::isEnabled())
{
$tos_condition = " AND (agree_date IS NOT NULL OR ud.usr_id = " . $ilDB->quote(SYSTEM_USER_ID, 'integer') . ") ";
}
// If the user is not in a course or a group, he has no associated users.
if (count($groups_and_courses_of_user) == 0)
{
$q = "SELECT count(user_id) as num,ctime,user_id,firstname,lastname,title,login,last_login ".
"FROM usr_session ".
"JOIN usr_data ud ON user_id = ud.usr_id ".
"WHERE user_id = ".$ilDB->quote($a_user_id, "integer")." ".
$no_anonym.
$tos_condition.
"AND expires > ".$ilDB->quote(time(), "integer")." ".
"GROUP BY user_id,ctime,firstname,lastname,title,login,last_login";
$r = $ilDB->query($q);
}
else
{
$q = "SELECT count(user_id) as num,s.ctime,s.user_id,ud.firstname,ud.lastname,ud.title,ud.login,ud.last_login ".
"FROM usr_session s ".
"JOIN usr_data ud ON ud.usr_id = s.user_id ".
"JOIN rbac_ua ua ON ua.usr_id = s.user_id ".
"JOIN rbac_fa fa ON fa.rol_id = ua.rol_id ".
"JOIN tree ON tree.child = fa.parent ".
"JOIN object_reference or1 ON or1.ref_id = tree.child ". // #17674 - rolf is gone
"JOIN object_data od ON od.obj_id = or1.obj_id ".
"LEFT JOIN usr_pref p ON (p.usr_id = ud.usr_id AND p.keyword = ".
$ilDB->quote("hide_own_online_status", "text").") ".
"WHERE s.user_id != 0 ".
$no_anonym.
"AND (p.value IS NULL OR NOT p.value = ".$ilDB->quote("y", "text").") ".
"AND s.expires > ".$ilDB->quote(time(),"integer")." ".
"AND fa.assign = ".$ilDB->quote("y", "text")." ".
$tos_condition.
"AND ".$ilDB->in("od.obj_id", $groups_and_courses_of_user, false, "integer")." ".
"GROUP BY s.user_id,s.ctime,ud.firstname,ud.lastname,ud.title,ud.login,ud.last_login ".
"ORDER BY ud.lastname, ud.firstname";
$r = $ilDB->query($q);
}
while ($user = $ilDB->fetchAssoc($r))
{
if ($atime <= 0
|| $user["ctime"] + $atime > $ctime)
{
$users[$user["user_id"]] = $user;
}
}
return $users ? $users : array();
}

+ Here is the caller graph for this function:

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

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

public

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

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

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

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

{
global $ilDB,$ilSetting;
include_once('./Services/Authentication/classes/class.ilAuthUtils.php');
$q = "SELECT login,usr_id,ext_account,auth_mode FROM usr_data ".
"WHERE auth_mode = %s";
$types[] = "text";
$values[] = $a_auth_mode;
if($a_read_auth_default and ilAuthUtils::_getAuthModeName($ilSetting->get('auth_mode',AUTH_LOCAL)) == $a_auth_mode)
{
$q.= " OR auth_mode = %s ";
$types[] = "text";
$values[] = 'default';
}
$res = $ilDB->queryF($q, $types, $values);
while ($row = $ilDB->fetchObject($res))
{
if($row->auth_mode == 'default')
{
$accounts[$row->usr_id] = $row->login;
}
else
{
$accounts[$row->usr_id] = $row->ext_account;
}
}
return $accounts ? $accounts : array();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

References $ilDB, and _lookupPref().

{
global $ilDB;
if ($a_user_id > 0)
{
return ilObjUser::_lookupPref($a_user_id, "priv_feed_pass");
}
return false;
}

+ Here is the call graph for this function:

ilObjUser::_getImportedUserId (   $i2_id)

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

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

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

{
global $ilDB;
$query = "SELECT obj_id FROM object_data WHERE import_id = ".
$ilDB->quote($i2_id, "text");
$res = $ilDB->query($query);
while($row = $ilDB->fetchObject($res))
{
$id = $row->obj_id;
}
return $id ? $id : 0;
}

+ Here is the caller graph for this function:

static ilObjUser::_getLastHistoryDataByUserId (   $a_usr_id)
static

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

Throws an ilUserException in case no entry could be found.

public

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

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

References $ilDB, $res, and $row.

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

{
global $ilDB;
$ilDB->setLimit(1, 0);
$res = $ilDB->queryF('
SELECT login, history_date FROM loginname_history
WHERE usr_id = %s ORDER BY history_date DESC',
array('integer'), array($a_usr_id));
$row = $ilDB->fetchAssoc($res);
if(!is_array($row) || !count($row)) throw new ilUserException('');
return array(
$row['login'], $row['history_date']
);
}

+ Here is the caller graph for this function:

ilObjUser::_getLocalAccountsForEmail (   $a_email)

check whether external account and authentication method matches with a user

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

References $ilDB, and $ilSetting.

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

{
global $ilDB, $ilSetting;
// default set to local (1)?
$q = "SELECT * FROM usr_data WHERE ".
" email = %s AND (auth_mode = %s ";
$types = array("text", "text");
$values = array($a_email, "local");
if ($ilSetting->get("auth_mode") == 1)
{
$q.=" OR auth_mode = %s";
$types[] = "text";
$values[] = "default";
}
$q.= ")";
$users = array();
$usr_set = $ilDB->queryF($q, $types, $values);
while ($usr_rec = $ilDB->fetchAssoc($usr_set))
{
$users[$usr_rec["usr_id"]] = $usr_rec["login"];
}
return $users;
}

+ Here is the caller graph for this function:

static ilObjUser::_getLoginAttempts (   $a_usr_id)
static

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

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

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

{
global $ilDB;
$query = "SELECT login_attempts FROM usr_data WHERE usr_id = %s";
$result = $ilDB->queryF( $query, array('integer'), array($a_usr_id) );
$record = $ilDB->fetchAssoc( $result );
$login_attempts = $record['login_attempts'];
}

+ Here is the caller graph for this function:

ilObjUser::_getNumberOfUsersForStyle (   $a_skin,
  $a_style 
)

skins and styles

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

References $ilDB.

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

{
global $ilDB;
$q = "SELECT count(*) as cnt FROM usr_pref up1, usr_pref up2 ".
" WHERE up1.keyword= ".$ilDB->quote("style", "text").
" AND up1.value= ".$ilDB->quote($a_style, "text").
" AND up2.keyword= ".$ilDB->quote("skin", "text").
" AND up2.value= ".$ilDB->quote($a_skin, "text").
" AND up1.usr_id = up2.usr_id ";
$cnt_set = $ilDB->query($q);
$cnt_rec = $ilDB->fetchAssoc($cnt_set);
return $cnt_rec["cnt"];
}

+ Here is the caller graph for this function:

ilObjUser::_getNumberOfUsersPerAuthMode ( )

get number of users per auth mode

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

References $ilDB.

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

{
global $ilDB;
$r = $ilDB->query("SELECT count(*) AS cnt, auth_mode FROM usr_data ".
"GROUP BY auth_mode");
$cnt_arr = array();
while($cnt = $ilDB->fetchAssoc($r))
{
$cnt_arr[$cnt["auth_mode"]] = $cnt["cnt"];
}
return $cnt_arr;
}

+ Here is the caller graph for this function:

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.

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

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

{
global $ilDB;
// BEGIN DiskQuota: Fetch all user preferences in a single query
$res = $ilDB->queryF("SELECT * FROM usr_pref WHERE ".
"keyword IN (%s,%s) ".
"AND usr_id = %s",
array("text", "text", "integer"),
array('public_upload', 'public_profile', $a_usr_id));
while ($row = $ilDB->fetchAssoc($res))
{
switch ($row['keyword'])
{
case 'public_upload' :
$upload = $row['value'] == 'y';
break;
case 'public_profile' :
$profile = ($row['value'] == 'y' ||
$row['value'] == 'g');
break;
}
}
// END DiskQuota: Fetch all user preferences in a single query
$webspace_dir = "";
if(defined('ILIAS_MODULE'))
{
$webspace_dir = ('.'.$webspace_dir);
}
$webspace_dir .= ('./'.ilUtil::getWebspaceDir());
$image_dir = $webspace_dir."/usr_images";
// BEGIN DiskQuota: Support 'big' user images
if ($a_size == 'big')
{
$thumb_file = $image_dir."/usr_".$a_usr_id.".jpg";
}
else
{
$thumb_file = $image_dir."/usr_".$a_usr_id."_".$a_size.".jpg";
}
// END DiskQuota: Support 'big' user images
if((($upload && $profile) || $a_force_pic)
&& @is_file($thumb_file))
{
$file = $thumb_file."?t=".rand(1, 99999);
}
else
{
if (!$a_prevent_no_photo_image)
{
// we only have xsmall and xxsmall for this
if($a_size == "small" || $a_size == "big")
{
$a_size = "xsmall";
}
$file = ilUtil::getImagePath("no_photo_".$a_size.".jpg");
}
}
return $file;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

References $ilDB, $prefs, and $row.

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

{
global $ilDB;
$prefs = array();
$r = $ilDB->queryF("SELECT * FROM usr_pref WHERE usr_id = %s",
array("integer"), array($user_id));
while($row = $ilDB->fetchAssoc($r))
{
$prefs[$row["keyword"]] = $row["value"];
}
return $prefs;
}

+ Here is the caller graph for this function:

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.

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

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

{
global $ilDB;
$ids = array();
if (is_array($a_internalids)) {
foreach ($a_internalids as $internalid) {
if (is_numeric ($internalid))
{
$ids[] = $internalid;
}
else
{
$parsedid = ilUtil::__extractId($internalid, IL_INST_ID);
if (is_numeric($parsedid) && $parsedid > 0)
{
$ids[] = $parsedid;
}
}
}
}
if (count($ids) == 0)
$ids [] = -1;
$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 ".$ilDB->in("usr_data.usr_id", $ids, false, "integer");
$values[] = "language";
$types[] = "text";
$query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
$data = array();
$result = $ilDB->queryF($query, $types, $values);
while ($row = $ilDB->fetchAssoc($result))
{
$data[] = $row;
}
return $data;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::_getUserIdsByEmail (   $a_email)
static

STATIC METHOD get all user_ids of an email address.

Parameters
stringemail of user
Returns
integer id of user public

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

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

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

{
global $ilias, $ilDB;
$res = $ilDB->queryF("SELECT login FROM usr_data ".
"WHERE email = %s and active = 1",
array("text"),
array($a_email));
$ids = array ();
while($row = $ilDB->fetchObject($res))
{
$ids[] = $row->login;
}
return $ids;
}

+ Here is the caller graph for this function:

static ilObjUser::_getUserIdsByInactivationPeriod (   $period)
static

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

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

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

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

Referenced by ilCronDeleteInactivatedUserAccounts\run().

{
$field = 'inactivation_date';
if( !(int)$period ) throw new ilException('no valid period given');
global $ilDB;
$date = date( 'Y-m-d H:i:s', (time() - ((int)$period * 24 * 60 * 60)) );
$query = "SELECT usr_id FROM usr_data WHERE $field < %s AND active = %s";
$res = $ilDB->queryF($query, array('timestamp', 'integer'), array($date, 0));
$ids = array();
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$ids[] = $row->usr_id;
}
return $ids;
}

+ Here is the caller graph for this function:

static ilObjUser::_getUserIdsByInactivityPeriod (   $period)
static

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

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

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

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

{
if( !(int)$period ) throw new ilException('no valid period given');
global $ilDB;
$date = date( 'Y-m-d H:i:s', (time() - ((int)$period * 24 * 60 * 60)) );
$query = "SELECT usr_id FROM usr_data WHERE last_login < %s";
$res = $ilDB->queryF($query, array('timestamp'), array($date));
$ids = array();
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$ids[] = $row->usr_id;
}
return $ids;
}
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.

References $ilDB.

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

{
global $ilDB;
$q = "SELECT DISTINCT user_id FROM personal_clipboard WHERE ".
"item_id = ".$ilDB->quote($a_id, "integer")." AND ".
"type = ".$ilDB->quote($a_type, "text");
$user_set = $ilDB->query($q);
$users = array();
while ($user_rec = $ilDB->fetchAssoc($user_set))
{
$users[] = $user_rec["user_id"];
}
return $users;
}

+ Here is the caller graph for this function:

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.

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

Referenced by ilSoapUserAdministration\getUsersForContainer().

{
global $ilDB;
$data = array();
$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 ";
$types[] = "text";
$values[] = "language";
if (is_numeric($active) && $active > -1)
{
$query .= " AND usr_data.active = %s";
$values[] = $active;
$types[] = "integer";
}
{
$query.= " AND usr_data.time_limit_owner = %s";
$values[] = $ref_id;
$types[] = "integer";
}
$query .= " AND usr_data.usr_id != %s ";
$values[] = ANONYMOUS_USER_ID;
$types[] = "integer";
$query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
$result = $ilDB->queryF($query, $types, $values);
$data = array();
while ($row = $ilDB->fetchAssoc($result))
{
array_push($data, $row);
}
return $data;
}

+ Here is the caller graph for this function:

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.

References $active, and _getUsersForIds().

Referenced by ilSoapUserAdministration\getUsersForContainer().

{
return ilObjUser::_getUsersForIds($a_mem_ids, $active);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

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

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

{
global $rbacadmin, $rbacreview, $ilDB;
// quote all ids
$ids = array();
foreach ($a_mem_ids as $mem_id) {
$ids [] = $ilDB->quote($mem_id);
}
$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 ".$ilDB->in("usr_data.usr_id", $ids, false, "integer")."
AND usr_data.usr_id != %s";
$values[] = "language";
$types[] = "text";
$values[] = ANONYMOUS_USER_ID;
$types[] = "integer";
if (is_numeric($active) && $active > -1)
{
$query .= " AND active = %s";
$values[] = $active;
$types[] = "integer";
}
if ($timelimitowner != USER_FOLDER_ID && $timelimitowner != -1)
{
$query.= " AND usr_data.time_limit_owner = %s";
$values[] = $timelimitowner;
$types[] = "integer";
}
$query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
$result = $ilDB->queryF($query, $types, $values);
while ($row = $ilDB->fetchAssoc($result))
{
$mem_arr[] = $row;
}
return $mem_arr ? $mem_arr : array();
}

+ Here is the caller graph for this function:

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.

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

Referenced by ilSoapUserAdministration\getUserForRole().

{
global $ilDB, $rbacreview;
$data = array();
$ids = $rbacreview->assignedUsers($role_id);
if (count ($ids) == 0)
{
$ids = array (-1);
}
$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 ".$ilDB->in("usr_data.usr_id", $ids, false, "integer");
$values[] = "language";
$types[] = "text";
if (is_numeric($active) && $active > -1)
{
$query .= " AND usr_data.active = %s";
$values[] = $active;
$types[] = "integer";
}
$query .= " ORDER BY usr_data.lastname, usr_data.firstname ";
$r = $ilDB->queryF($query, $types, $values);
$data = array();
while ($row = $ilDB->fetchAssoc($r))
{
$data[] = $row;
}
return $data;
}

+ Here is the caller graph for this function:

static ilObjUser::_incrementLoginAttempts (   $a_usr_id)
static

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

References $ilDB, and $query.

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

{
global $ilDB;
$query = "UPDATE usr_data SET login_attempts = (login_attempts + 1) WHERE usr_id = %s";
$affected = $ilDB->manipulateF( $query, array('integer'), array($a_usr_id) );
if($affected) return true;
else return false;
}

+ Here is the caller graph for this function:

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.

References $ilDB.

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

{
global $ilDB;
if (self::$is_desktop_item_loaded[$a_usr_id.":".$a_item_id])
{
return self::$is_desktop_item_cache[$a_usr_id.":".$a_item_id.":".$a_type];
}
$item_set = $ilDB->queryF("SELECT item_id FROM desktop_item WHERE ".
"item_id = %s AND type = %s AND user_id = %s",
array("integer", "text", "integer"),
array($a_item_id, $a_type, $a_usr_id));
if ($ilDB->fetchAssoc($item_set))
{
return true;
}
else
{
return false;
}
}

+ Here is the caller graph for this function:

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

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

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

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

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

{
global $ilDB;
$q = "SELECT DISTINCT login, usr_id FROM usr_data ".
"WHERE login = %s";
$types[] = "text";
$values[] = $a_login;
if ($a_user_id != 0)
{
$q.= " AND usr_id != %s ";
$types[] = "integer";
$values[] = $a_user_id;
}
$r = $ilDB->queryF($q, $types, $values);
if ($row = $ilDB->fetchAssoc($r))
{
return $row['usr_id'];
}
return false;
}

+ Here is the caller graph for this function:

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

Private function for lookup methods.

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

References $ilDB, and $res.

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

{
global $ilDB;
$res = $ilDB->queryF("SELECT ".$a_field." FROM usr_data WHERE usr_id = %s",
array("integer"), array($a_user_id));
while($set = $ilDB->fetchAssoc($res))
{
return $set[$a_field];
}
return false;
}

+ Here is the caller graph for this function:

ilObjUser::_lookupActive (   $a_usr_id)

Check user account active.

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

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

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

{
global $ilDB;
$query = 'SELECT usr_id FROM usr_data '.
'WHERE active = '.$ilDB->quote(1,'integer').' '.
'AND usr_id = '.$ilDB->quote($a_usr_id,'integer');
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
return true;
}
return false;
}

+ Here is the caller graph for this function:

static ilObjUser::_lookupAuthMode (   $a_usr_id)
static

lookup auth mode

public

Parameters
intusr_id

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

References _lookup().

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

{
return (string) ilObjUser::_lookup($a_usr_id, "auth_mode");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::_lookupClientIP (   $a_user_id)

Lookup client ip.

Parameters
intuser id
Returns
string client ip

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

References _lookup().

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

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

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

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

{
global $ilUser, $rbacsystem, $tree, $ilDB;
if ($a_types == "")
{
$is_nested_set = ($tree->getTreeImplementation() instanceof ilNestedSetTree);
$item_set = $ilDB->queryF("SELECT obj.obj_id, obj.description, oref.ref_id, obj.title, obj.type ".
" FROM desktop_item it, object_reference oref ".
", object_data obj".
" WHERE ".
"it.item_id = oref.ref_id AND ".
"oref.obj_id = obj.obj_id AND ".
"it.user_id = %s", array("integer"), array($user_id));
$items = $all_parent_path = array();
while ($item_rec = $ilDB->fetchAssoc($item_set))
{
if ($tree->isInTree($item_rec["ref_id"])
&& $item_rec["type"] != "rolf"
&& $item_rec["type"] != "itgr") // due to bug 11508
{
$parent_ref = $tree->getParentId($item_rec["ref_id"]);
if(!isset($all_parent_path[$parent_ref]))
{
// #15746
//if($is_nested_set)
//{
// $par_left = $tree->getLeftValue($parent_ref);
// $all_parent_path[$parent_ref] = sprintf("%010d", $par_left);
//}
//else
//{
$node = $tree->getNodeData($parent_ref);
$all_parent_path[$parent_ref] = $node["title"];
//}
}
$parent_path = $all_parent_path[$parent_ref];
$title = ilObject::_lookupTitle($item_rec["obj_id"]);
$desc = ilObject::_lookupDescription($item_rec["obj_id"]);
$items[$parent_path.$title.$item_rec["ref_id"]] =
array("ref_id" => $item_rec["ref_id"],
"obj_id" => $item_rec["obj_id"],
"type" => $item_rec["type"],
"title" => $title,
"description" => $desc,
"parent_ref" => $parent_ref);
}
}
ksort($items);
}
else
{
// due to bug 11508
if (!is_array($a_types))
{
$a_types = array($a_types);
}
$items = array();
$foundsurveys = array();
foreach($a_types as $a_type)
{
if ($a_type == "itgr")
{
continue;
}
$item_set = $ilDB->queryF("SELECT obj.obj_id, obj.description, oref.ref_id, obj.title FROM desktop_item it, object_reference oref ".
", object_data obj WHERE ".
"it.item_id = oref.ref_id AND ".
"oref.obj_id = obj.obj_id AND ".
"it.type = %s AND ".
"it.user_id = %s ".
"ORDER BY title",
array("text", "integer"),
array($a_type, $user_id));
while ($item_rec = $ilDB->fetchAssoc($item_set))
{
$title = ilObject::_lookupTitle($item_rec["obj_id"]);
$desc = ilObject::_lookupDescription($item_rec["obj_id"]);
$items[$title.$a_type.$item_rec["ref_id"]] =
array("ref_id" => $item_rec["ref_id"],
"obj_id" => $item_rec["obj_id"], "type" => $a_type,
"title" => $title, "description" => $desc);
}
}
ksort($items);
}
return $items;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::_lookupExternalAccount (   $a_user_id)

lookup external account for login and authmethod

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

References _lookup().

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

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

References $ilDB.

Referenced by ilUserFeedWriter\ilUserFeedWriter().

{
global $ilDB;
if ($a_user_id > 0)
{
$set = $ilDB->queryF("SELECT feed_hash from usr_data WHERE usr_id = %s",
array("integer"), array($a_user_id));
if ($rec = $ilDB->fetchAssoc($set))
{
if (strlen($rec["feed_hash"]) == 32)
{
return $rec["feed_hash"];
}
else if($a_create)
{
$hash = md5(rand(1,9999999) + str_replace(" ", "", (string) microtime()));
$ilDB->manipulateF("UPDATE usr_data SET feed_hash = %s".
" WHERE usr_id = %s",
array("text", "integer"),
array($hash, $a_user_id));
return $hash;
}
}
}
return false;
}

+ Here is the caller graph for this function:

ilObjUser::_lookupFields (   $a_user_id)

lookup fields (deprecated; use more specific methods instead)

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

References $ilDB, and $res.

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

{
global $ilDB;
$res = $ilDB->queryF("SELECT * FROM usr_data WHERE usr_id = %s",
array("integer"), array($a_user_id));
$user_rec = $ilDB->fetchAssoc($res);
return $user_rec;
}

+ Here is the caller graph for this function:

static ilObjUser::_lookupGender (   $a_user_id)
static

Lookup gender.

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

References _lookup().

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

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilObjUser::_lookupId (   $a_user_str)
static

lookup id by login

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

References $ilDB, and $res.

Referenced by ilDiskQuotaSummaryNotification\__construct(), ilMail\__getCountRecipient(), ilMail\__getEmailRecipients(), ilObjUserGUI\_goto(), ilShopUtils\_sendNotificationToVATAdministration(), ilSoapObjectAdministration\addObject(), ilOrgUnitStaffGUI\addOtherRoles(), ilOrgUnitStaffGUI\addStaff(), ilRepositorySearchGUI\addUserFromAutoComplete(), ilObjBlogGUI\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().

{
global $ilDB;
$res = $ilDB->queryF("SELECT usr_id FROM usr_data WHERE login = %s",
array("text"), array($a_user_str));
$user_rec = $ilDB->fetchAssoc($res);
return $user_rec["usr_id"];
}

+ Here is the caller graph for this function:

ilObjUser::_lookupIm (   $a_user_id,
  $a_type 
)

Lookup IM.

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

References _lookup().

Referenced by ilUsersOnlineBlockGUI\fillRow().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilObjUser::_lookupLanguage (   $a_usr_id)
static

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

References $ilDB, and $row.

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

{
global $ilDB;
$q = "SELECT value FROM usr_pref WHERE usr_id= ".
$ilDB->quote($a_usr_id, "integer")." AND keyword = ".
$ilDB->quote('language', "text");
$r = $ilDB->query($q);
while($row = $ilDB->fetchAssoc($r))
{
return $row['value'];
}
return 'en';
}

+ Here is the caller graph for this function:

ilObjUser::_lookupLastLogin (   $a_user_id)

lookup last login

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

References _lookup().

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

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::_lookupLogin (   $a_user_id)

lookup login

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

References _lookup().

Referenced by ilCourseXMLParser\__parseId(), ilRegistrationSettings\__read(), ilPaymentStatisticGUI\addStatisticWorksheet(), ilObjPaymentSettingsGUI\addStatisticWorksheet(), ilMailSearchGroupsGUI\adoptMembers(), ilMailSearchCoursesGUI\adoptMembers(), ilObjSessionGUI\eventsListObject(), ilSessionOverviewGUI\exportCSV(), ilPageHistoryTableGUI\fillRow(), ilMilestoneResponsiblesTableGUI\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(), ilMailSearchGroupsGUI\mailMembers(), ilMailSearchCoursesGUI\mailMembers(), ilPermission2GUI\owner(), ilCalendarSharedUserListTableGUI\parse(), ilSessionParticipantsTableGUI\parse(), ilObjGroupGUI\readMemberData(), ilObjCourseGUI\readMemberData(), ilCalendarEntry\readResponsibleUsers(), ilObjExerciseGUI\redirectFeedbackMailObject(), ilMailSummaryNotification\send(), ilForum\sendForumNotifications(), ilMembershipCronNotifications\sendMail(), ilMailNotification\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().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

References $ilDB, and $res.

Referenced by ilExGradesTableGUI\__construct(), ilExParticipantTableGUI\__construct(), ilGroupXMLParser\__parseId(), ilObjTestAccess\_getParticipantData(), ilObjPaymentSettingsGUI\addStatisticWorksheet(), ilMailSearchGroupsGUI\adoptMembers(), ilMailSearchCoursesGUI\adoptMembers(), ilObjSessionGUI\confirmAssignFromWaitingListObject(), ilObjGroupGUI\confirmAssignFromWaitingListObject(), ilObjCourseGUI\confirmAssignFromWaitingListObject(), ilObjSessionGUI\confirmAssignSubscribersObject(), ilObjGroupGUI\confirmAssignSubscribersObject(), ilObjCourseGUI\confirmAssignSubscribersObject(), ilObjSessionGUI\confirmRefuseFromListObject(), ilObjGroupGUI\confirmRefuseFromListObject(), ilObjCourseGUI\confirmRefuseFromListObject(), ilObjSessionGUI\confirmRefuseSubscribersObject(), ilObjGroupGUI\confirmRefuseSubscribersObject(), ilObjCourseGUI\confirmRefuseSubscribersObject(), ilOrgUnitStaffGUI\confirmRemoveUser(), ilSkillProfileGUI\confirmUserRemoval(), ilObjCourseGUI\deleteMembersObject(), ilObjTestGUI\deleteSingleUserResultsObject(), ilLocalUserGUI\deleteUsers(), ilObjCategoryGUI\deleteUsersObject(), ilExAssignment\deliverReturnedFiles(), ilExAssignment\downloadAllDeliveredFiles(), ilObjPortfolioGUI\downloadExcSubFile(), ilObjBlogGUI\downloadExcSubFile(), ilExAssignment\downloadMultipleFiles(), ilExAssignment\downloadSelectedFiles(), ilObjSessionGUI\eventsListObject(), ilSessionOverviewGUI\exportCSV(), ilObjExercise\exportGradesExcel(), ilObjAssessmentFolderGUI\exportLogObject(), ilPageHistoryTableGUI\fillRow(), ilAssessmentFolderLogTableGUI\fillRow(), ilCalendarInboxSharedTableGUI\fillRow(), ilFileVersionTableGUI\fillRow(), ilRbacLogTableGUI\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(), ilCalendarSharedUserListTableGUI\parse(), ilCalendarSharedListTableGUI\parse(), ilConsultationHoursTableGUI\parse(), ilSessionParticipantsTableGUI\parse(), ilGroupParticipantsTableGUI\parse(), ilCourseParticipantsTableGUI\parse(), ilObjGroupGUI\readMemberData(), ilObjCourseGUI\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().

{
global $ilDB;
$res = $ilDB->queryF("SELECT firstname, lastname, title, login FROM usr_data WHERE usr_id = %s",
array("integer"), array($a_user_id));
$user_rec = $ilDB->fetchAssoc($res);
return array("user_id" => $a_user_id,
"firstname" => $user_rec["firstname"],
"lastname" => $user_rec["lastname"],
"title" => $user_rec["title"],
"login" => $user_rec["login"]);
}

+ Here is the caller graph for this function:

ilObjUser::_lookupPref (   $a_usr_id,
  $a_keyword 
)

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

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

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

{
global $ilDB;
$query = "SELECT * FROM usr_pref WHERE usr_id = ".$ilDB->quote($a_usr_id, "integer")." ".
"AND keyword = ".$ilDB->quote($a_keyword, "text");
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
return $row->value;
}
return false;
}

+ Here is the caller graph for this function:

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.

References $ilDB, and _writePref().

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

{
global $ilDB;
$q = "SELECT up1.usr_id usr_id FROM usr_pref up1, usr_pref up2 ".
" WHERE up1.keyword= ".$ilDB->quote("style", "text").
" AND up1.value= ".$ilDB->quote($a_from_style, "text").
" AND up2.keyword= ".$ilDB->quote("skin", "text").
" AND up2.value= ".$ilDB->quote($a_from_skin, "text").
" AND up1.usr_id = up2.usr_id ";
$usr_set = $ilDB->query($q);
while ($usr_rec = $ilDB->fetchAssoc($usr_set))
{
self::_writePref($usr_rec["usr_id"], "skin", $a_to_skin);
self::_writePref($usr_rec["usr_id"], "style", $a_to_style);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilObjUser::_readUsersProfileData (   $a_user_ids)
static

STATIC METHOD get user data of selected users.

Parameters
arraydesired user ids
Returns
array of user data public

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

References $ilDB, $res, and $row.

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

{
global $ilDB;
$res = $ilDB->query("SELECT * FROM usr_data WHERE ".
$ilDB->in("usr_id", $a_user_ids, false, "integer"));
while ($row = $ilDB->fetchAssoc($res))
{
$user_data["$row[usr_id]"] = $row;
}
return $user_data ? $user_data : array();
}

+ Here is the caller graph for this function:

static ilObjUser::_removeItemFromDesktops (   $a_id)
static

removes object from all user's desktops public

Parameters
integerref_id
Returns
array user_ids of all affected users

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

References $ilDB, and $row.

Referenced by ilUtil\removeItemFromDesktops().

{
global $ilDB;
$r = $ilDB->queryF("SELECT user_id FROM desktop_item WHERE item_id = %s",
array("integer"), array($a_id));
$users = array();
while ($row = $ilDB->fetchObject($r))
{
$users[] = $row->user_id;
} // while
if (count($users) > 0)
{
$ilDB->manipulateF("DELETE FROM desktop_item WHERE item_id = %s",
array("integer"), array($a_id));
}
return $users;
}

+ Here is the caller graph for this function:

static ilObjUser::_resetLoginAttempts (   $a_usr_id)
static

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

References $ilDB, and $query.

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

{
global $ilDB;
$query = "UPDATE usr_data SET login_attempts = 0 WHERE usr_id = %s";
$affected = $ilDB->manipulateF( $query, array('integer'), array($a_usr_id) );
if($affected) return true;
else return false;
}

+ Here is the caller graph for this function:

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.

References $ilDB, and _writePref().

{
global $ilDB;
self::_writePref($a_user_id, "priv_feed_pass",
($a_password=="") ? "" : md5($a_password));
}

+ Here is the call graph for this function:

static ilObjUser::_setUserInactive (   $a_usr_id)
static

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

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

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

{
global $ilDB;
$query = "UPDATE usr_data SET active = 0, inactivation_date = %s WHERE usr_id = %s";
$affected = $ilDB->manipulateF( $query, array('timestamp', 'integer'), array(ilUtil::now(), $a_usr_id) );
if($affected) return true;
else return false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Toggle active status of users.

public

Parameters

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

References $ilDB, and ilUtil\now().

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

{
global $ilDB;
if(!is_array($a_usr_ids))
{
return false;
}
if( $a_status )
{
$q = "UPDATE usr_data SET active = 1, inactivation_date = NULL WHERE ".
$ilDB->in("usr_id", $a_usr_ids, false, "integer");
$ilDB->manipulate($q);
}
else
{
$usrId_IN_usrIds = $ilDB->in("usr_id", $a_usr_ids, false, "integer");
$q = "UPDATE usr_data SET active = 0 WHERE $usrId_IN_usrIds";
$ilDB->manipulate($q);
$queryString = "
UPDATE usr_data
SET inactivation_date = %s
WHERE inactivation_date IS NULL
AND $usrId_IN_usrIds
";
$ilDB->manipulateF($queryString, array('timestamp'), array(ilUtil::now()));
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

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

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

References $ilDB, and $query.

Referenced by ShibAuth\login().

{
if($a_last_login !== null) $last_login = $a_last_login;
else $last_login = date('Y-m-d H:i:s');
global $ilDB;
$query = "UPDATE usr_data SET last_login = %s WHERE usr_id = %s";
$affected = $ilDB->manipulateF( $query, array('timestamp', 'integer'), array($last_login, $a_usr_id) );
if($affected) return $last_login;
else return false;
}

+ Here is the caller graph for this function:

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.

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

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

{
$webspace_dir = ilUtil::getWebspaceDir();
$image_dir = $webspace_dir."/usr_images";
$store_file = "usr_".$obj_id."."."jpg";
$target_file = $image_dir."/$store_file";
chmod($tmp_file, 0770);
// take quality 100 to avoid jpeg artefacts when uploading jpeg files
// taking only frame [0] to avoid problems with animated gifs
$show_file = "$image_dir/usr_".$obj_id.".jpg";
$thumb_file = "$image_dir/usr_".$obj_id."_small.jpg";
$xthumb_file = "$image_dir/usr_".$obj_id."_xsmall.jpg";
$xxthumb_file = "$image_dir/usr_".$obj_id."_xxsmall.jpg";
ilUtil::execConvert($tmp_file . "[0] -geometry 200x200 -quality 100 JPEG:".$show_file);
ilUtil::execConvert($tmp_file . "[0] -geometry 100x100 -quality 100 JPEG:".$thumb_file);
ilUtil::execConvert($tmp_file . "[0] -geometry 75x75 -quality 100 JPEG:".$xthumb_file);
ilUtil::execConvert($tmp_file . "[0] -geometry 30x30 -quality 100 JPEG:".$xxthumb_file);
// store filename
self::_writePref($obj_id, "profile_image", $store_file);
return TRUE;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

References $ilDB, $res, and $row.

Referenced by ilStartUpGUI\confirmRegistration().

{
global $ilDB;
$res = $ilDB->queryf('
SELECT usr_id, create_date FROM usr_data
WHERE reg_hash = %s',
array('text'),
array($a_hash));
while($row = $ilDB->fetchAssoc($res))
{
require_once 'Services/Registration/classes/class.ilRegistrationSettings.php';
$oRegSettigs = new ilRegistrationSettings();
if((int)$oRegSettigs->getRegistrationHashLifetime() != 0 &&
time() - (int)$oRegSettigs->getRegistrationHashLifetime() > strtotime($row['create_date']))
{
require_once 'Services/Registration/exceptions/class.ilRegConfirmationLinkExpiredException.php';
throw new ilRegConfirmationLinkExpiredException('reg_confirmation_hash_life_time_expired', $row['usr_id']);
}
$ilDB->manipulateF('
UPDATE usr_data
SET reg_hash = %s
WHERE usr_id = %s',
array('text', 'integer'),
array('', (int)$row['usr_id'])
);
return (int)$row['usr_id'];
}
require_once 'Services/Registration/exceptions/class.ilRegistrationHashNotFoundException.php';
throw new ilRegistrationHashNotFoundException('reg_confirmation_hash_not_found');
}

+ Here is the caller graph for this function:

ilObjUser::_writeAuthMode (   $a_usr_id,
  $a_auth_mode 
)

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

References $ilDB.

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

{
global $ilDB;
$ilDB->manipulateF("UPDATE usr_data ".
" SET auth_mode = %s WHERE usr_id = %s",
array("text", "integer"),
array($a_auth_mode, $a_usr_id));
}

+ Here is the caller graph for this function:

ilObjUser::_writeExternalAccount (   $a_usr_id,
  $a_ext_id 
)

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

References $ilDB.

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

{
global $ilDB;
$ilDB->manipulateF("UPDATE usr_data ".
" SET ext_account = %s WHERE usr_id = %s",
array("text", "integer"),
array($a_ext_id, $a_usr_id));
}

+ Here is the caller graph for this function:

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

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

References $ilDB, $res, and $timestamp.

Referenced by updateLogin().

{
global $ilDB;
$timestamp = time();
$res = $ilDB->queryF('SELECT * FROM loginname_history WHERE usr_id = %s AND login = %s AND history_date = %s',
array('integer', 'text', 'integer'),
array($a_usr_id, $a_login, $timestamp));
if( $ilDB->numRows($res) == 0 )
{
$ilDB->manipulateF('
INSERT INTO loginname_history
(usr_id, login, history_date)
VALUES (%s, %s, %s)',
array('integer', 'text', 'integer'),
array($a_usr_id, $a_login, $timestamp));
}
return true;
}

+ Here is the caller graph for this function:

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.

References $ilDB.

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

{
global $ilDB;
$ilDB->replace("usr_pref",
array(
"usr_id" => array("integer", $a_usr_id),
"keyword" => array("text", $a_keyword),
),
array(
"value" => array("text",$a_value)
)
);
/*
self::_deletePref($a_usr_id, $a_keyword);
if(strlen($a_value))
{
$ilDB->manipulateF(
'INSERT INTO usr_pref (usr_id, keyword, value) VALUES (%s, %s, %s)',
array('integer', 'text', 'text'),
array($a_usr_id, $a_keyword, $a_value)
);
}*/
}

+ Here is the caller graph for this function:

ilObjUser::activateDeletionFlag ( )

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

References writePref().

{
$this->writePref("delete_flag", true);
}

+ Here is the call graph for this function:

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.

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

{
ilObjUser::_addDesktopItem($this->getId(), $a_item_id, $a_type, $a_par);
}

+ Here is the call graph for this function:

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.

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

{
global $ilDB;
if ($a_time == 0)
{
$a_time = date("Y-m-d H:i:s", time());
}
$item_set = $ilDB->queryF("SELECT * FROM personal_clipboard WHERE ".
"parent = %s AND item_id = %s AND type = %s AND user_id = %s",
array("integer", "integer", "text", "integer"),
array(0, $a_item_id, $a_type, $this->getId()));
// only insert if item is not already in clipboard
if (!$d = $item_set->fetchRow())
{
$ilDB->manipulateF("INSERT INTO personal_clipboard ".
"(item_id, type, user_id, title, parent, insert_time, order_nr) VALUES ".
" (%s,%s,%s,%s,%s,%s,%s)",
array("integer", "text", "integer", "text", "integer", "timestamp", "integer"),
array($a_item_id, $a_type, $this->getId(), $a_title, (int) $a_parent, $a_time, (int) $a_order_nr));
}
else
{
$ilDB->manipulateF("UPDATE personal_clipboard SET insert_time = %s ".
"WHERE user_id = %s AND item_id = %s AND type = %s AND parent = 0",
array("timestamp", "integer", "integer", "text"),
array($a_time, $this->getId(), $a_item_id, $a_type));
}
}

+ Here is the call graph for this function:

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.

References $ilDB, and ilObject\getId().

{
global $ilDB;
if ($a_time == 0)
{
$a_time = date("Y-m-d H:i:s", time());
}
$ilDB->insert("personal_pc_clipboard", array(
"user_id" => array("integer", $this->getId()),
"content" => array("clob", $a_content),
"insert_time" => array("timestamp", $a_time),
"order_nr" => array("integer", $a_nr)
));
}

+ Here is the call graph for this function:

ilObjUser::addUserDefinedFieldEntry ( )

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

References $ilDB.

{
global $ilDB;
// not needed. no entry in udf_text/udf_clob means no value
/* $query = "INSERT INTO udf_data (usr_id ) ".
"VALUES( ".
$ilDB->quote($this->getId(),'integer').
")";
$res = $ilDB->manipulate($query);
*/
return true;
}
ilObjUser::assignData (   $a_data)

loads a record "user" from array public

Parameters
arrayuserdata

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

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

{
global $ilErr, $ilDB, $lng;
// basic personal data
$this->setLogin($a_data["login"]);
if (! $a_data["passwd_type"])
{
$ilErr->raiseError("<b>Error: passwd_type missing in function assignData(). ".
$this->id."!</b><br />class: ".get_class($this)."<br />Script: "
.__FILE__."<br />Line: ".__LINE__, $ilErr->FATAL);
}
if ($a_data["passwd"] != "********" and strlen($a_data['passwd']))
{
$this->setPasswd($a_data["passwd"], $a_data["passwd_type"]);
}
$this->setGender($a_data["gender"]);
$this->setUTitle($a_data["title"]);
$this->setFirstname($a_data["firstname"]);
$this->setLastname($a_data["lastname"]);
$this->setFullname();
if (!is_array($a_data['birthday']))
{
$this->setBirthday($a_data['birthday']);
}
else
{
$this->setBirthday(null);
}
// address data
$this->setInstitution($a_data["institution"]);
$this->setDepartment($a_data["department"]);
$this->setStreet($a_data["street"]);
$this->setCity($a_data["city"]);
$this->setZipcode($a_data["zipcode"]);
$this->setCountry($a_data["country"]);
$this->setSelectedCountry($a_data["sel_country"]);
$this->setPhoneOffice($a_data["phone_office"]);
$this->setPhoneHome($a_data["phone_home"]);
$this->setPhoneMobile($a_data["phone_mobile"]);
$this->setFax($a_data["fax"]);
$this->setMatriculation($a_data["matriculation"]);
$this->setEmail($a_data["email"]);
$this->setHobby($a_data["hobby"]);
$this->setClientIP($a_data["client_ip"]);
$this->setPasswordEncodingType($a_data['passwd_enc_type']);
$this->setPasswordSalt($a_data['passwd_salt']);
// instant messenger data
$this->setInstantMessengerId('icq',$a_data["im_icq"]);
$this->setInstantMessengerId('yahoo',$a_data["im_yahoo"]);
$this->setInstantMessengerId('msn',$a_data["im_msn"]);
$this->setInstantMessengerId('aim',$a_data["im_aim"]);
$this->setInstantMessengerId('skype',$a_data["im_skype"]);
$this->setInstantMessengerId('jabber',$a_data["im_jabber"]);
$this->setInstantMessengerId('voip',$a_data["im_voip"]);
// other data
$this->setDelicious($a_data["delicious"]);
$this->setLatitude($a_data["latitude"]);
$this->setLongitude($a_data["longitude"]);
$this->setLocationZoom($a_data["loc_zoom"]);
// system data
$this->setLastLogin($a_data["last_login"]);
$this->setLastUpdate($a_data["last_update"]);
$this->create_date = $a_data["create_date"];
$this->setComment($a_data["referral_comment"]);
$this->approve_date = $a_data["approve_date"];
$this->active = $a_data["active"];
$this->agree_date = $a_data["agree_date"];
$this->setInactivationDate($a_data["inactivation_date"]);
// time limitation
$this->setTimeLimitOwner($a_data["time_limit_owner"]);
$this->setTimeLimitUnlimited($a_data["time_limit_unlimited"]);
$this->setTimeLimitFrom($a_data["time_limit_from"]);
$this->setTimeLimitUntil($a_data["time_limit_until"]);
$this->setTimeLimitMessage($a_data['time_limit_message']);
// user profile incomplete?
$this->setProfileIncomplete($a_data["profile_incomplete"]);
//authentication
$this->setAuthMode($a_data['auth_mode']);
$this->setExternalAccount($a_data['ext_account']);
$this->setIsSelfRegistered((bool)$a_data['is_self_registered']);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

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

{
$current = $this->$a_attr;
if(is_array($current) && sizeof($current))
{
return implode(", ", $current);
}
}

+ Here is the caller graph for this function:

ilObjUser::checkTimeLimit ( )

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

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

{
if($this->getTimeLimitUnlimited())
{
return true;
}
if($this->getTimeLimitFrom() < time() and $this->getTimeLimitUntil() > time())
{
return true;
}
return false;
}

+ Here is the call graph for this function:

ilObjUser::checkUserId ( )

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

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

{
global $ilAuth, $ilSetting;
if ($id > 0)
{
return $id;
}
return false;
}

+ Here is the call graph for this function:

ilObjUser::clipboardDeleteAll ( )

Delete objects of type for user.

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

References $ilDB, and ilObject\getId().

Referenced by delete().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::clipboardDeleteObjectsOfType (   $a_type)

Delete objects of type for user.

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

References $ilDB, and ilObject\getId().

{
global $ilDB;
$ilDB->manipulateF("DELETE FROM personal_clipboard WHERE ".
"type = %s AND user_id = %s",
array("text", "integer"),
array($a_type, $this->getId()));
}

+ Here is the call graph for this function:

ilObjUser::clipboardHasObjectsOfType (   $a_type)

Check whether clipboard has objects of a certain type.

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

References $ilDB, and ilObject\getId().

{
global $ilDB;
$set = $ilDB->queryF("SELECT * FROM personal_clipboard WHERE ".
"parent = %s AND type = %s AND user_id = %s",
array("integer", "text", "integer"),
array(0, $a_type, $this->getId()));
if ($rec = $ilDB->fetchAssoc($set))
{
return true;
}
return false;
}

+ Here is the call graph for this function:

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

Get profile picture direcotory.

Parameters
@return

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

References ilUtil\getWebspaceDir().

Referenced by ilUserDataSet\getXmlRecord().

{
$a_dir = trim(str_replace("..", "", $a_dir));
if ($a_dir == "" || !is_dir($a_dir))
{
return;
}
$webspace_dir = ilUtil::getWebspaceDir();
$image_dir = $webspace_dir."/usr_images";
$images = array(
"upload_".$a_user_id."pic",
"usr_".$a_user_id."."."jpg",
"usr_".$a_user_id."_small.jpg",
"usr_".$a_user_id."_xsmall.jpg",
"usr_".$a_user_id."_xxsmall.jpg",
"upload_".$a_user_id);
foreach ($images as $image)
{
if (is_file($image_dir."/".$image))
{
copy($image_dir."/".$image, $a_dir."/".$image);
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::delete ( )

deletes a user public

Parameters
integeruser_id

Reimplemented from ilObject.

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

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

{
global $rbacadmin, $ilDB;
// deassign from ldap groups
include_once('Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
$mapping->deleteUser($this->getId());
// remove mailbox / update sent mails
include_once ("Services/Mail/classes/class.ilMailbox.php");
$mailbox = new ilMailbox($this->getId());
$mailbox->delete();
$mailbox->updateMailsOfDeletedUser($this->getLogin());
// delete feed blocks on personal desktop
include_once("./Services/Block/classes/class.ilCustomBlock.php");
$costum_block = new ilCustomBlock();
$costum_block->setContextObjId($this->getId());
$costum_block->setContextObjType("user");
$c_blocks = $costum_block->queryBlocksForContext();
include_once("./Services/Feeds/classes/class.ilPDExternalFeedBlock.php");
foreach($c_blocks as $c_block)
{
if ($c_block["type"] == "pdfeed")
{
$fb = new ilPDExternalFeedBlock($c_block["id"]);
$fb->delete();
}
}
// delete block settings
include_once("./Services/Block/classes/class.ilBlockSetting.php");
// delete user_account
$ilDB->manipulateF("DELETE FROM usr_data WHERE usr_id = %s",
array("integer"), array($this->getId()));
// delete user_prefs
$this->removeUserPicture(false); // #8597
// delete user_session
include_once("./Services/Authentication/classes/class.ilSession.php");
// remove user from rbac
$rbacadmin->removeUser($this->getId());
// remove bookmarks
// TODO: move this to class.ilBookmarkFolder
$q = "DELETE FROM bookmark_tree WHERE tree = ".
$ilDB->quote($this->getId(), "integer");
$ilDB->manipulate($q);
$q = "DELETE FROM bookmark_data WHERE user_id = ".
$ilDB->quote($this->getId(), "integer");
$ilDB->manipulate($q);
// DELETE FORUM ENTRIES (not complete in the moment)
include_once './Modules/Forum/classes/class.ilObjForum.php';
ilObjForum::_deleteUser($this->getId());
// Delete link check notify entries
include_once './Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
// Delete crs entries
include_once './Modules/Course/classes/class.ilObjCourse.php';
// Delete user tracking
include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
include_once 'Modules/Session/classes/class.ilEventParticipants.php';
// Delete Tracking data SCORM 2004 RTE
include_once 'Modules/Scorm2004/classes/ilSCORM13Package.php';
// Delete Tracking data SCORM 1.2 RTE
include_once 'Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php';
// remove all notifications
include_once "./Services/Notification/classes/class.ilNotification.php";
// remove portfolios
include_once "./Modules/Portfolio/classes/class.ilObjPortfolio.php";
// remove workspace
include_once "./Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
$tree = new ilWorkspaceTree($this->getId());
$tree->cascadingDelete();
// remove disk quota entries
include_once "./Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
// remove reminder entries
require_once 'Services/User/classes/class.ilCronDeleteInactiveUserReminderMail.php';
// Delete user defined field entries
// Delete clipboard entries
// Reset owner
$this->resetOwner();
include_once 'Services/Contact/classes/class.ilAddressbook.php';
ilAddressbook::onUserDeletion($this);
// Trigger deleteUser Event
global $ilAppEventHandler;
$ilAppEventHandler->raise(
'Services/User', 'deleteUser', array('usr_id' => $this->getId())
);
// delete object data
return true;
}

+ Here is the call graph for this function:

ilObjUser::deleteMultiTextFields ( )
protected

Remove multi-text values from DB.

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

References $ilDB, and ilObject\getId().

Referenced by delete(), and updateMultiTextFields().

{
global $ilDB;
if(!$this->getId())
{
return;
}
$ilDB->manipulate("DELETE FROM usr_data_multi".
" WHERE usr_id = ".$ilDB->quote($this->getId(), "integer"));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::deletePref (   $a_keyword)

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

Parameters
stringkeyword

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

References ilObject\getId().

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

+ Here is the call graph for this function:

ilObjUser::deleteUserDefinedFieldEntries ( )

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

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

Referenced by delete().

{
global $ilDB;
include_once("./Services/User/classes/class.ilUserDefinedData.php");
// wrong place...
/* $query = "DELETE FROM udf_data ".
"WHERE usr_id = ".$ilDB->quote($this->getId(),'integer');
$res = $ilDB->manipulate($query);*/
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

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

Referenced by ilObjGroup\leaveGroup().

{
ilObjUser::_dropDesktopItem($this->getId(), $a_item_id, $a_type);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::exportPersonalData ( )

Export personal data.

Parameters
@return

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

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

{
include_once("./Services/Export/classes/class.ilExport.php");
$exp = new ilExport();
$dir = ilExport::_getExportDirectory($this->getId(), "xml", "usr", "personal_data");
ilUtil::delDir($dir, true);
$title = $this->getLastname().", ".$this->getLastname()." [".$this->getLogin()."]";
$exp->exportEntity("personal_data", $this->getId(), "4.5.0",
"Services/User", $title, $dir);
}

+ Here is the call graph for this function:

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

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

References $ilDB, $res, and $row.

Referenced by ilPublicUserProfileGUI\getAutocompleteResult().

{
global $ilDB;
$res = array();
$sql = "SELECT DISTINCT(value)".
" FROM usr_data_multi".
" WHERE ".$ilDB->like("value", "text", "%".$a_term."%");
if($a_field_id)
{
$sql .= " AND field_id = ".$ilDB->quote($a_field_id, "text");
}
if($a_user_id)
{
$sql .= " AND usr_id <> ".$ilDB->quote($a_user_id, "integer");
}
$sql .= " ORDER BY value";
$set = $ilDB->query($sql);
while($row = $ilDB->fetchAssoc($set))
{
$res[] = $row["value"];
}
return $res;
}

+ Here is the caller graph for this function:

ilObjUser::getActive ( )

get user active state public

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

References $active.

{
return $this->active;
}
ilObjUser::getAgreeDate ( )

get the date when the user accepted the user agreement public

Returns
string date of last update

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

References $agree_date.

{
}
& ilObjUser::getAppliedUsers ( )

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

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

{
$this->applied_users = array();
$this->__readAppliedUsers($this->getId());
return $this->applied_users ? $this->applied_users : array();
}

+ Here is the call graph for this function:

ilObjUser::getApproveDate ( )

get the date when the user account was approved public

Returns
string approve date

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

References $approve_date.

{
}
ilObjUser::getAuthMode (   $a_auth_key = false)

get auth mode public

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

References $auth_mode, and ilAuthUtils\_getAuthMode().

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

{
if (!$a_auth_key)
{
}
include_once('./Services/Authentication/classes/class.ilAuthUtils.php');
return ilAuthUtils::_getAuthMode($this->auth_mode);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::getBirthday ( )

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

References $birthday.

{
}
ilObjUser::getCity ( )

get city public

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

References $city.

Referenced by ilPersonalProfileGUI\addLocationToForm().

{
return $this->city;
}

+ Here is the caller graph for this function:

ilObjUser::getClientIP ( )

get client ip number public

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

References $client_ip.

{
}
ilObjUser::getClipboardChilds (   $a_parent,
  $a_insert_time 
)

Get childs of an item.

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

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

{
global $ilDB, $ilUser;
$objs = $ilDB->queryF("SELECT * FROM personal_clipboard WHERE ".
"user_id = %s AND parent = %s AND insert_time = %s ".
" ORDER BY order_nr",
array("integer", "integer", "timestamp"),
array($ilUser->getId(), (int) $a_parent, $a_insert_time));
$objects = array();
while ($obj = $ilDB->fetchAssoc($objs))
{
if ($obj["type"] == "mob")
{
$obj["title"] = ilObject::_lookupTitle($obj["item_id"]);
}
$objects[] = array ("id" => $obj["item_id"],
"type" => $obj["type"], "title" => $obj["title"]);
}
return $objects;
}

+ Here is the call graph for this function:

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.

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

{
global $ilDB;
$par = "";
if ($a_top_nodes_only)
{
$par = " AND parent = ".$ilDB->quote(0, "integer")." ";
}
$type_str = ($a_type != "")
? " AND type = ".$ilDB->quote($a_type, "text")." "
: "";
$q = "SELECT * FROM personal_clipboard WHERE ".
"user_id = ".$ilDB->quote($this->getId(), "integer")." ".
$type_str.$par.
" ORDER BY order_nr";
$objs = $ilDB->query($q);
$objects = array();
while ($obj = $ilDB->fetchAssoc($objs))
{
if ($obj["type"] == "mob")
{
$obj["title"] = ilObject::_lookupTitle($obj["item_id"]);
}
if ($obj["type"] == "incl")
{
include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
$obj["title"] = ilMediaPoolPage::lookupTitle($obj["item_id"]);
}
$objects[] = array ("id" => $obj["item_id"],
"type" => $obj["type"], "title" => $obj["title"],
"insert_time" => $obj["insert_time"]);
}
return $objects;
}

+ Here is the call graph for this function:

ilObjUser::getComment ( )

get referral comment public

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

References $referral_comment.

ilObjUser::getCountry ( )

Get country (free text)

public

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

References $country.

Referenced by ilPersonalProfileGUI\addLocationToForm().

{
}

+ Here is the caller graph for this function:

ilObjUser::getCurrentLanguage ( )

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

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

References $_SESSION.

{
return $_SESSION['lang'];
}
ilObjUser::getDateFormat ( )

get date format

public

Returns

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

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

{
if($format = $this->getPref('date_format'))
{
return $format;
}
else
{
include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
return $settings->getDefaultDateFormat();
}
}

+ Here is the call graph for this function:

ilObjUser::getDelicious ( )

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

References $delicious.

{
}
ilObjUser::getDepartment ( )

get department public

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

References $department.

{
}
ilObjUser::getDesktopItems (   $a_types = "")

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

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

{
return $this->_lookupDesktopItems($this->getId(), $a_types);
}

+ Here is the call graph for this function:

ilObjUser::getDiskQuota ( )

Returns the minimal disk quota imposed by this user account.

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

public

Returns
integer

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

{
return $this->prefs["disk_quota"] ? $this->prefs["disk_quota"] : 0;
}
ilObjUser::getEmail ( )

get email address public

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

References $email.

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

{
return $this->email;
}

+ Here is the caller graph for this function:

ilObjUser::getExternalAccount ( )

get external account

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

public

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

Referenced by ilECSAppEventListener\handleMembership().

{
return $this->ext_account;
}

+ Here is the caller graph for this function:

ilObjUser::getFax ( )

get fax public

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

References $fax.

{
return $this->fax;
}
static ilObjUser::getFirstLettersOfLastnames ( )
static

Get first letters of all lastnames.

Parameters
@return

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

References $ilDB.

Referenced by ilObjUserFolderGUI\viewObject().

{
global $ilDB;
$q = "SELECT DISTINCT ".$ilDB->upper($ilDB->substr("lastname", 1, 1))." let".
" FROM usr_data".
" WHERE usr_id <> ".$ilDB->quote(ANONYMOUS_USER_ID, "integer").
" ORDER BY let";
$let_set = $ilDB->query($q);
$lets = array();
while ($let_rec = $ilDB->fetchAssoc($let_set))
{
$let[$let_rec["let"]] = $let_rec["let"];
}
return $let;
}

+ Here is the caller graph for this function:

ilObjUser::getFirstname ( )

get firstname public

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

References $firstname.

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

{
}

+ Here is the caller graph for this function:

ilObjUser::getFullname (   $a_max_strlen = 0)

get fullname public

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

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

References ilUtil\stripSlashes().

Referenced by shibUser\createFields().

{
if (!$a_max_strlen)
{
return ilUtil::stripSlashes($this->fullname);
}
if (strlen($this->fullname) <= $a_max_strlen)
{
return ilUtil::stripSlashes($this->fullname);
}
if ((strlen($this->utitle) + strlen($this->lastname) + 4) <= $a_max_strlen)
{
return ilUtil::stripSlashes($this->utitle." ".substr($this->firstname,0,1).". ".$this->lastname);
}
if ((strlen($this->firstname) + strlen($this->lastname) + 1) <= $a_max_strlen)
{
return ilUtil::stripSlashes($this->firstname." ".$this->lastname);
}
if ((strlen($this->lastname) + 3) <= $a_max_strlen)
{
return ilUtil::stripSlashes(substr($this->firstname,0,1).". ".$this->lastname);
}
return ilUtil::stripSlashes(substr($this->lastname,0,$a_max_strlen));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::getGender ( )

get gender public

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

References $gender.

{
return $this->gender;
}
ilObjUser::getGeneralInterests ( )

Get general interests.

Returns
array $value

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

References $interests_general.

Referenced by updateMultiTextFields().

+ Here is the caller graph for this function:

ilObjUser::getGeneralInterestsAsText ( )

Get general interests as plain text.

Returns
string

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

References buildTextFromArray().

{
return $this->buildTextFromArray("interests_general");
}

+ Here is the call graph for this function:

ilObjUser::getHobby ( )

get hobby public

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

References $hobby.

{
return $this->hobby;
}
ilObjUser::getInactivationDate ( )

getter for inactivation date

Returns
string $inactivation_date

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

References $inactivation_date.

ilObjUser::getInstantMessengerId (   $a_im_type)

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

{
$var = "im_".$a_im_type;
return $this->$var;
}
ilObjUser::getInstitution ( )

get institution public

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

References $institution.

{
}
ilObjUser::getLanguage ( )

returns a 2char-language-string public

Returns
string language

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

Referenced by ilNotificationConfig\getUserInstance().

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

+ Here is the caller graph for this function:

ilObjUser::getLastLogin ( )

returns last login date public

Returns
string date

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

{
return $this->last_login;
}
ilObjUser::getLastname ( )

get lastname public

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

References $lastname.

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

{
}

+ Here is the caller graph for this function:

ilObjUser::getLastPasswordChangeTS ( )

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

References $last_password_change_ts.

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

+ Here is the caller graph for this function:

ilObjUser::getLastUpdate ( )

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

References ilObject\$last_update.

{
}
ilObjUser::getLatitude ( )

Get Latitude.

Returns
string Latitude

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

References $latitude.

Referenced by ilPersonalProfileGUI\addLocationToForm().

{
}

+ Here is the caller graph for this function:

ilObjUser::getLocationZoom ( )

Get Location Zoom.

Returns
int Location Zoom

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

References $loc_zoom.

Referenced by ilPersonalProfileGUI\addLocationToForm().

{
}

+ Here is the caller graph for this function:

ilObjUser::getLogin ( )

get login / username public

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

References $login.

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

{
return $this->login;
}

+ Here is the caller graph for this function:

ilObjUser::getLoginAttempts ( )

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

References $login_attempts.

{
}
ilObjUser::getLoginByUserId (   $a_userid)

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

References $login, and _lookupLogin().

Referenced by ilObjPaymentSettingsGUI\editVendorObject().

{
return $login ? $login : false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

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

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

{
global $ilAuth;
// BEGIN WebDAV: Strip Microsoft Domain Names from logins
require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
{
require_once ('Services/WebDAV/classes/class.ilDAVServer.php');
require_once ('Services/Database/classes/class.ilAuthContainerMDB2.php');
}
else
{
$login =$ilAuth->getUsername();
}
return $login;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::getLongitude ( )

Get Longitude.

Returns
string Longitude

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

References $longitude.

Referenced by ilPersonalProfileGUI\addLocationToForm().

{
}

+ Here is the caller graph for this function:

ilObjUser::getLookingForHelp ( )

Get help looking for.

Returns
array $value

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

References $interests_help_looking.

Referenced by updateMultiTextFields().

+ Here is the caller graph for this function:

ilObjUser::getLookingForHelpAsText ( )

Get help looking for as plain text.

Returns
string

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

References buildTextFromArray().

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

+ Here is the call graph for this function:

ilObjUser::getMatriculation ( )

get matriculation number public

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

References $matriculation.

{
}
ilObjUser::getOfferingHelp ( )

Get help offering.

Returns
array $value

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

References $interests_help_offered.

Referenced by updateMultiTextFields().

+ Here is the caller graph for this function:

ilObjUser::getOfferingHelpAsText ( )

Get help offering as plain text.

Returns
string

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

References buildTextFromArray().

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

+ Here is the call graph for this function:

ilObjUser::getPasswd ( )

get password

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

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

References $passwd.

Referenced by ilUserPasswordManager\verifyPassword().

{
return $this->passwd;
}

+ Here is the caller graph for this function:

ilObjUser::getPasswdType ( )

get password type

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

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

References $passwd_type.

{
}
ilObjUser::getPasswordAge ( )

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

References getLastPasswordChangeTS().

{
$current_ts = time();
$pass_change_ts = $this->getLastPasswordChangeTS();
$password_age = (int) ( ($current_ts - $pass_change_ts) / 86400 );
return $password_age;
}

+ Here is the call graph for this function:

ilObjUser::getPasswordEncodingType ( )
Returns
string

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

References $password_encoding_type.

Referenced by ilUserPasswordManager\verifyPassword().

+ Here is the caller graph for this function:

ilObjUser::getPasswordSalt ( )
Returns
string|null

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

References $password_salt.

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

{
}

+ Here is the caller graph for this function:

ilObjUser::getPCClipboardContent ( )

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

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

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

{
global $ilDB;
$set = $ilDB->queryF("SELECT MAX(insert_time) mtime FROM personal_pc_clipboard ".
" WHERE user_id = %s", array("integer"), array($this->getId()));
$row = $ilDB->fetchAssoc($set);
$set = $ilDB->queryF("SELECT * FROM personal_pc_clipboard ".
" WHERE user_id = %s AND insert_time = %s ORDER BY order_nr ASC",
array("integer", "timestamp"),
array($this->getId(), $row["mtime"]));
$content = array();
while ($row = $ilDB->fetchAssoc($set))
{
$content[] = $row["content"];
}
return $content;
}

+ Here is the call graph for this function:

ilObjUser::getPersonalDataExportFile ( )

Get personal data export file.

Parameters
@return

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

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

Referenced by sendPersonalDataFile().

{
include_once("./Services/Export/classes/class.ilExport.php");
$dir = ilExport::_getExportDirectory($this->getId(), "xml", "usr", "personal_data");
if (!is_dir($dir))
{
return "";
}
foreach(ilUtil::getDir($dir) as $entry)
{
if (is_int(strpos($entry["entry"], ".zip")))
{
return $entry["entry"];
}
}
return "";
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

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

{
if(isset(self::$personal_image_cache[$this->getId()][$a_size][(int)$a_force_pic]))
{
return self::$personal_image_cache[$this->getId()][$a_size][(int)$a_force_pic];
}
self::$personal_image_cache[$this->getId()][$a_size][(int)$a_force_pic] = ilObjUser::_getPersonalPicturePath($this->getId(), $a_size, $a_force_pic);
return self::$personal_image_cache[$this->getId()][$a_size][(int)$a_force_pic];
}

+ Here is the call graph for this function:

ilObjUser::getPersonalWorkspaceDiskQuota ( )

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

{
return $this->prefs["wsp_disk_quota"] ? $this->prefs["wsp_disk_quota"] : 0;
}
ilObjUser::getPhoneHome ( )

get home phone public

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

References $phone_home.

{
}
ilObjUser::getPhoneMobile ( )

get mobile phone public

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

References $phone_mobile.

{
}
ilObjUser::getPhoneOffice ( )

get office phone public

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

References $phone_office.

{
}
ilObjUser::getPref (   $a_keyword)

get a user preference

Parameters
stringname of parameter public

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

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

{
if (array_key_exists($a_keyword, $this->prefs))
{
return $this->prefs[$a_keyword];
}
else
{
return FALSE;
}
}

+ Here is the caller graph for this function:

ilObjUser::getProfileIncomplete ( )

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

{
if($this->id == ANONYMOUS_USER_ID)
{
return false;
}
return $this->profile_incomplete;
}
ilObjUser::getPublicName ( )

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

Returns
string

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

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

{
if ($this->hasPublicProfile())
return $this->getFirstname()." ".$this->getLastname()." (".$this->getLogin().")";
else
return $this->getLogin();
}

+ Here is the call graph for this function:

ilObjUser::getSelectedCountry ( )

Get selected country (selection drop down)

Returns
string selected country

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

References $sel_country.

{
}
ilObjUser::getStoredActive (   $a_id)

get user active state

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

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

References $active, and _lookup().

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

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::getStreet ( )

get street public

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

References $street.

Referenced by ilPersonalProfileGUI\addLocationToForm().

{
return $this->street;
}

+ Here is the caller graph for this function:

ilObjUser::getTimeFormat ( )

get time format

public

Returns

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

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

{
if($format = $this->getPref('time_format'))
{
return $format;
}
else
{
include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
return $settings->getDefaultTimeFormat();
}
}

+ Here is the call graph for this function:

ilObjUser::getTimeLimitFrom ( )

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

Referenced by checkTimeLimit().

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

+ Here is the caller graph for this function:

ilObjUser::getTimeLimitMessage ( )

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

{
return $this->time_limit_message;
}
ilObjUser::getTimeLimitOwner ( )

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

{
return $this->time_limit_owner ? $this->time_limit_owner : 7;
}
ilObjUser::getTimeLimitUnlimited ( )

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

Referenced by checkTimeLimit().

{
return $this->time_limit_unlimited;
}

+ Here is the caller graph for this function:

ilObjUser::getTimeLimitUntil ( )

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

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

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

+ Here is the caller graph for this function:

ilObjUser::getTimeZone ( )

get timezone of user

public

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

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

{
if($tz = $this->getPref('user_tz'))
{
return $tz;
}
else
{
include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
return $settings->getDefaultTimeZone();
}
}

+ Here is the call graph for this function:

ilObjUser::getUserDefinedData ( )

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

{
return $this->user_defined_data ? $this->user_defined_data : array();
}
ilObjUser::getUserIdByEmail (   $a_email)
static

STATIC METHOD get the user_id of an email address.

Parameters
stringemail of user
Returns
integer id of user public

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

References $ilDB, $res, and $row.

Referenced by ilObjUserTest\testAuthAndEmailMethods().

{
global $ilDB;
$res = $ilDB->queryF("SELECT usr_id FROM usr_data ".
"WHERE email = %s", array("text"), array($a_email));
$row = $ilDB->fetchObject($res);
return $row->usr_id ? $row->usr_id : 0;
}

+ Here is the caller graph for this function:

ilObjUser::getUTitle ( )

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

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

References $utitle.

{
return $this->utitle;
}
ilObjUser::getZipcode ( )

get zipcode public

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

References $zipcode.

{
}
static ilObjUser::hasActiveSession (   $a_user_id)
static

Check for simultaneous login.

Returns
bool

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

References $ilDB, and $row.

Referenced by ilAuthBase\loginObserver().

{
global $ilDB;
$set = $ilDB->queryf('
SELECT COUNT(*) session_count
FROM usr_session WHERE user_id = %s AND expires > %s',
array('integer', 'integer'),
array($a_user_id, time()));
$row = $ilDB->fetchAssoc($set);
return (bool)$row['session_count'];
}

+ Here is the caller graph for this function:

ilObjUser::hasDeletionFlag ( )

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

References getPref().

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

+ Here is the call graph for this function:

ilObjUser::hasPublicProfile ( )

returns true if public is profile, false otherwise

Returns
boolean

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

References getPref().

Referenced by getPublicName().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

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

Referenced by ilTermsOfServiceHelper\trackAcceptance().

{
if(null === $status)
{
return ilSession::get('has_to_accept_agr_in_session');
}
require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
if(ilTermsOfServiceHelper::isEnabled())
{
ilSession::set('has_to_accept_agr_in_session', (int)$status);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

{
include_once("./Services/Export/classes/class.ilImport.php");
$imp = new ilImport();
if (!$a_profile_data)
{
$imp->addSkipEntity("Services/User", "usr_profile");
}
if (!$a_settings)
{
$imp->addSkipEntity("Services/User", "usr_setting");
}
if (!$a_bookmarks)
{
$imp->addSkipEntity("Services/Bookmarks", "bookmarks");
}
if (!$a_notes)
{
$imp->addSkipEntity("Services/Notes", "user_notes");
}
if (!$a_calendar)
{
$imp->addSkipEntity("Services/Calendar", "calendar");
}
$imp->importEntity($a_file["tmp_name"], $a_file["name"], "personal_data",
"Services/User");
}
static ilObjUser::initInactivationDate (   $usrIds)
staticprivate

type $ilDB

Parameters
type$usrIds

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

References $ilDB.

{
global $ilDB;
$NOW = $ilDB->now();
$usrId_IN_usrIds = $ilDB->in('usr_id', $usrIds, false, 'integer');
$queryString = "
UPDATE usr_data
SET inactivation_date = $NOW
WHERE inactivation_date IS NULL
AND $usrId_IN_usrIds
";
$ilDB->manipulate($queryString);
}
ilObjUser::isAnonymous ( )
Returns
bool

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

References ilObject\getId().

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

+ Here is the call graph for this function:

ilObjUser::isCaptchaVerified ( )

Is user captcha verified?

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

References $_SESSION.

{
return (boolean) $_SESSION["user_captcha_verified"];
}
ilObjUser::isChild (   $a_usr_id)

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

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

{
if($a_usr_id == $this->getId())
{
return true;
}
$this->applied_users = array();
$this->__readAppliedUsers($this->getId());
return in_array($a_usr_id,$this->applied_users);
}

+ Here is the call graph for this function:

ilObjUser::isCurrentUserActive ( )

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

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

{
global $ilDB,$ilAuth;
$set = $ilDB->queryF("SELECT active FROM usr_data WHERE login= %s",
array("text"),
array($login));
//query has got a result
if ($rec = $ilDB->fetchAssoc($set))
{
if ($rec["active"])
{
return true;
}
}
return false;
}

+ Here is the call graph for this function:

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.

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

{
return ilObjUser::_isDesktopItem($this->getId(), $a_item_id, $a_type);
}

+ Here is the call graph for this function:

ilObjUser::isPasswordChangeDemanded ( )

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

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

{
//error_reporting(E_ALL);
if( $this->id == ANONYMOUS_USER_ID || $this->id == SYSTEM_USER_ID )
return false;
require_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
&& $security->isPasswordChangeOnFirstLoginEnabled()
&& $this->getLastPasswordChangeTS() == 0
&& $this->is_self_registered == false
){
return true;
}
else return false;
}

+ Here is the call graph for this function:

ilObjUser::isPasswordExpired ( )

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

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

{
//error_reporting(E_ALL);
if($this->id == ANONYMOUS_USER_ID) return false;
require_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
if( $this->getLastPasswordChangeTS() > 0 )
{
$max_pass_age = $security->getPasswordMaxAge();
if( $max_pass_age > 0 )
{
$max_pass_age_ts = ( $max_pass_age * 86400 );
$pass_change_ts = $this->getLastPasswordChangeTS();
$current_ts = time();
if( ($current_ts - $pass_change_ts) > $max_pass_age_ts )
return true;
}
}
return false;
}

+ Here is the call graph for this function:

ilObjUser::isSelfRegistered ( )

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

References $is_self_registered.

{
}
static ilObjUser::lookupMatriculation (   $a_usr_id)
static

Lookup matriculation.

Returns
string matricualtion
Parameters
int$a_usr_idpublic

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

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

Referenced by ilObjCourseGrouping\_checkGroupingDependencies().

{
global $ilDB;
$query = "SELECT matriculation FROM usr_data ".
"WHERE usr_id = ".$ilDB->quote($a_usr_id);
$res = $ilDB->query($query);
return $row->matriculation ? $row->matriculation : '';
}

+ Here is the caller graph for this function:

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.

References ilObject\$id, and $ilDB.

Referenced by ilObjectListGUIPreloader\preload().

{
global $ilDB;
if (!is_array($a_item_ids))
{
return;
}
$item_ids = array();
foreach ($a_item_ids as $id)
{
if (!self::$is_desktop_item_loaded[$a_usr_id.":".$id])
{
$item_ids[] = $id;
}
self::$is_desktop_item_loaded[$a_usr_id.":".$id] = true;
}
if (count($item_ids) > 0)
{
$item_set = $ilDB->query("SELECT item_id, type FROM desktop_item WHERE ".
$ilDB->in("item_id", $item_ids, false, "integer").
" AND user_id = ".$ilDB->quote($a_usr_id, "integer"));
while ($r = $ilDB->fetchAssoc($item_set))
{
self::$is_desktop_item_cache[$a_usr_id.":".$r["item_id"].":".$r["type"]]
= true;
}
}
}

+ Here is the caller graph for this function:

ilObjUser::read ( )

loads a record "user" from database private

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

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

Referenced by __construct().

{
global $ilErr, $ilDB;
// Alex: I have removed the JOIN to rbac_ua, since there seems to be no
// use (3.11.0 alpha)
/*$q = "SELECT * FROM usr_data ".
"LEFT JOIN rbac_ua ON usr_data.usr_id=rbac_ua.usr_id ".
"WHERE usr_data.usr_id= ".$ilDB->quote($this->id); */
$r = $ilDB->queryF("SELECT * FROM usr_data ".
"WHERE usr_id= %s", array("integer"), array($this->id));
if ($data = $ilDB->fetchAssoc($r))
{
// convert password storage layout used by table usr_data into
// storage layout used by class ilObjUser
$data["passwd_type"] = IL_PASSWD_CRYPTED;
// this assign must not be set via $this->assignData($data)
// because this method will be called on profile updates and
// would set this values to 0, because they arent posted from form
$this->setLastPasswordChangeTS( $data['last_password_change'] );
$this->setLoginAttempts( $data['login_attempts'] );
// fill member vars in one shot
$this->assignData($data);
//get userpreferences from usr_pref table
$this->readPrefs();
//set language to default if not set
if ($this->prefs["language"] == "")
{
$this->prefs["language"] = $this->oldPrefs["language"];
}
//check skin-setting
include_once("./Services/Style/classes/class.ilStyleDefinition.php");
if ($this->prefs["skin"] == "" ||
!ilStyleDefinition::skinExists($this->prefs["skin"]))
{
$this->prefs["skin"] = $this->oldPrefs["skin"];
}
$this->skin = $this->prefs["skin"];
//check style-setting (skins could have more than one stylesheet
if ($this->prefs["style"] == "" ||
!ilStyleDefinition::skinExists($this->skin, $this->prefs["style"]))
{
//load default (css)
$this->prefs["style"] = $this->ilias->ini->readVariable("layout","style");
}
if (empty($this->prefs["hits_per_page"]))
{
$this->prefs["hits_per_page"] = 10;
}
}
else
{
$ilErr->raiseError("<b>Error: There is no dataset with id ".
$this->id."!</b><br />class: ".get_class($this)."<br />Script: ".__FILE__.
"<br />Line: ".__LINE__, $ilErr->FATAL);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::readMultiTextFields ( )
protected

Fetch multi-text values from DB.

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

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

Referenced by read().

{
global $ilDB;
if(!$this->getId())
{
return;
}
$set = $ilDB->query("SELECT field_id,value".
" FROM usr_data_multi".
" WHERE usr_id = ".$ilDB->quote($this->getId(), "integer").
" ORDER BY value");
while($row = $ilDB->fetchAssoc($set))
{
$values[$row["field_id"]][] = $row["value"];
}
if(isset($values["interests_general"]))
{
$this->setGeneralInterests($values["interests_general"]);
}
else
{
}
if(isset($values["interests_help_offered"]))
{
$this->setOfferingHelp($values["interests_help_offered"]);
}
else
{
$this->setOfferingHelp();
}
if(isset($values["interests_help_looking"]))
{
$this->setLookingForHelp($values["interests_help_looking"]);
}
else
{
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::readPrefs ( )

get all user preferences private

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

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

Referenced by read().

{
global $ilDB;
if (is_array($this->prefs))
{
$this->oldPrefs = $this->prefs;
}
$this->prefs = ilObjUser::_getPreferences($this->id);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::readUserDefinedFields ( )

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

References $ilDB, and ilObject\getId().

Referenced by read().

{
global $ilDB;
include_once("./Services/User/classes/class.ilUserDefinedData.php");
$udata = new ilUserDefinedData($this->getId());
/* $query = "SELECT * FROM udf_data ".
"WHERE usr_id = ".$ilDB->quote($this->getId(),'integer');
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_ASSOC))
{
$this->user_defined_data = $row;
}*/
$this->user_defined_data = $udata->getAll();
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::refreshLogin ( )

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

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

References $ilDB.

{
global $ilDB;
$ilDB->manipulateF("UPDATE usr_data SET ".
"last_login = ".$ilDB->now().
" WHERE usr_id = %s",
array("integer"), array($this->id));
}
ilObjUser::removeDeletionFlag ( )

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

References writePref().

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

+ Here is the call graph for this function:

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.

References $ilDB, and ilObject\getId().

{
global $ilDB;
$q = "DELETE FROM personal_clipboard WHERE ".
"item_id = ".$ilDB->quote($a_item_id, "integer").
" AND type = ".$ilDB->quote($a_type, "text")." ".
" AND user_id = ".$ilDB->quote($this->getId(), "integer");
$ilDB->manipulate($q);
}

+ Here is the call graph for this function:

ilObjUser::removeUserPicture (   $a_do_update = true)

Remove user picture.

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

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

Referenced by delete().

{
$webspace_dir = ilUtil::getWebspaceDir();
$image_dir = $webspace_dir."/usr_images";
$file = $image_dir."/usr_".$this->getID()."."."jpg";
$thumb_file = $image_dir."/usr_".$this->getID()."_small.jpg";
$xthumb_file = $image_dir."/usr_".$this->getID()."_xsmall.jpg";
$xxthumb_file = $image_dir."/usr_".$this->getID()."_xxsmall.jpg";
$upload_file = $image_dir."/upload_".$this->getID();
if($a_do_update)
{
// remove user pref file name
$this->setPref("profile_image", "");
$this->update();
}
if (@is_file($file))
{
unlink($file);
}
if (@is_file($thumb_file))
{
unlink($thumb_file);
}
if (@is_file($xthumb_file))
{
unlink($xthumb_file);
}
if (@is_file($xxthumb_file))
{
unlink($xxthumb_file);
}
if (@is_file($upload_file))
{
unlink($upload_file);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilObjUser::resetInactivationDate (   $usrIds)
staticprivate

type $ilDB

Parameters
type$usrIds

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

References $ilDB.

{
global $ilDB;
$usrId_IN_usrIds = $ilDB->in('usr_id', $usrIds, false, 'integer');
$queryString = "
UPDATE usr_data
SET inactivation_date = NULL
WHERE $usrId_IN_usrIds
";
$ilDB->manipulate($queryString);
}
ilObjUser::resetLastPasswordChange ( )

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

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

{
global $ilDB;
$query = "UPDATE usr_data SET last_password_change = 0 " .
"WHERE usr_id = %s";
$affected = $ilDB->manipulateF( $query, array('integer'),
array($this->getId()) );
if($affected) return true;
else return false;
}

+ Here is the call graph for this function:

ilObjUser::resetOwner ( )

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

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

Referenced by delete().

{
global $ilDB;
$query = "UPDATE object_data SET owner = 0 ".
"WHERE owner = ".$ilDB->quote($this->getId(),'integer');
$ilDB->query($query);
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

STATIC METHOD get the user_ids which correspond a search string.

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

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

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

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

{
global $ilias, $ilDB, $ilLog;
$query = "SELECT usr_data.usr_id, usr_data.login, usr_data.firstname, usr_data.lastname, usr_data.email, usr_data.active FROM usr_data ";
$without_anonymous_users = true;
// determine join filter
$join_filter = " WHERE ";
if ($filter_settings !== FALSE && strlen($filter_settings))
{
switch ($filter_settings)
{
case 3:
// show only users without courses
$join_filter = " LEFT JOIN obj_members ON usr_data.usr_id = obj_members.usr_id WHERE obj_members.usr_id IS NULL AND ";
break;
case 5:
// show only users with a certain course membership
$ref_id = $_SESSION["user_filter_data"];
if ($ref_id)
{
$join_filter = " LEFT JOIN obj_members ON usr_data.usr_id = obj_members.usr_id WHERE obj_members.obj_id = ".
"(SELECT obj_id FROM object_reference WHERE ref_id = ".$ilDB->quote($ref_id, "integer").") AND ";
}
break;
case 6:
global $rbacreview;
$ref_id = $_SESSION["user_filter_data"];
if ($ref_id)
{
$local_roles = $rbacreview->getRolesOfRoleFolder($ref_id,false);
if (is_array($local_roles) && count($local_roles))
{
$join_filter = " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE ".
$ilDB->in("rbac_ua.rol_id", $local_roles, false, $local_roles)." AND ";
}
}
break;
case 7:
global $rbacreview;
$rol_id = $_SESSION["user_filter_data"];
if ($rol_id)
{
$join_filter = " LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE rbac_ua.rol_id = ".
$ilDB->quote($rol_id, "integer")." AND ";
$without_anonymous_users = false;
}
break;
}
}
// This is a temporary hack to search users by their role
// See Mantis #338. This is a hack due to Mantis #337.
if (strtolower(substr($a_search_str, 0, 5)) == "role:")
{
$query = "SELECT DISTINCT usr_data.usr_id,usr_data.login,usr_data.firstname,usr_data.lastname,usr_data.email ".
"FROM object_data,rbac_ua,usr_data ".
"WHERE ".$ilDB->like("object_data.title", "text", "%".substr($a_search_str,5)."%").
" AND object_data.type = 'role' ".
"AND rbac_ua.rol_id = object_data.obj_id ".
"AND usr_data.usr_id = rbac_ua.usr_id ".
"AND rbac_ua.usr_id != ".$ilDB->quote(ANONYMOUS_USER_ID, "integer");
}
else
{
$query.= $join_filter.
"(".$ilDB->like("usr_data.login", "text", "%".$a_search_str."%")." ".
"OR ".$ilDB->like("usr_data.firstname", "text", "%".$a_search_str."%")." ".
"OR ".$ilDB->like("usr_data.lastname", "text", "%".$a_search_str."%")." ".
"OR ".$ilDB->like("usr_data.email", "text", "%".$a_search_str."%").") ";
if ($filter_settings !== FALSE && strlen($filter_settings))
{
switch ($filter_settings)
{
case 0:
$query.= " AND usr_data.active = ".$ilDB->quote(0, "integer")." ";
break;
case 1:
$query.= " AND usr_data.active = ".$ilDB->quote(1, "integer")." ";
break;
case 2:
$query.= " AND usr_data.time_limit_unlimited = ".$ilDB->quote(0, "integer")." ";
break;
case 4:
$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"]));
$query.= " AND last_login < ".$ilDB->quote($date, "timestamp")." ";
break;
}
}
if ($without_anonymous_users)
{
$query.= "AND usr_data.usr_id != ".$ilDB->quote(ANONYMOUS_USER_ID, "integer");
}
if (is_numeric($active) && $active > -1 && $filter_settings === FALSE)
{
$query.= " AND active = ".$ilDB->quote($active, "integer")." ";
}
}
$ilLog->write($query);
$res = $ilDB->query($query);
while ($row = $ilDB->fetchObject($res))
{
$users[] = array(
"usr_id" => $row->usr_id,
"login" => $row->login,
"firstname" => $row->firstname,
"lastname" => $row->lastname,
"email" => $row->email,
"active" => $row->active);
$ids[] = $row->usr_id;
}
if ($a_return_ids_only)
return $ids ? $ids : array();
else
return $users ? $users : array();
}

+ Here is the caller graph for this function:

ilObjUser::sendPersonalDataFile ( )

Send personal data file.

Parameters
@return

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

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

{
include_once("./Services/Export/classes/class.ilExport.php");
$file = ilExport::_getExportDirectory($this->getId(), "xml", "usr", "personal_data").
"/".$this->getPersonalDataExportFile();
if (is_file($file))
{
}
}

+ Here is the call graph for this function:

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

set user active state and updates system fields appropriately public

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

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

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

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

{
$this->setOwner($a_owner);
if ($a_active)
{
$this->active = 1;
$this->setApproveDate(date('Y-m-d H:i:s'));
$this->setOwner($a_owner);
}
else
{
$this->active = 0;
$this->setApproveDate(null);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::setAgreeDate (   $a_str)

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

Returns
void

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

{
$this->agree_date = $a_str;
}
ilObjUser::setApproveDate (   $a_str)

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

Returns
void

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

Referenced by setActive().

{
$this->approve_date = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setAuthMode (   $a_str)

set auth mode public

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

Referenced by assignData().

{
$this->auth_mode = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setBirthday (   $a_birthday)

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

References IL_CAL_DATE.

Referenced by assignData().

{
if (strlen($a_birthday))
{
$date = new ilDate($a_birthday, IL_CAL_DATE);
$this->birthday = $date->get(IL_CAL_DATE);
}
else
{
$this->birthday = null;
}
}

+ Here is the caller graph for this function:

ilObjUser::setCaptchaVerified (   $a_val)

Set captcha verified.

Parameters

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

References $_SESSION.

{
$_SESSION["user_captcha_verified"] = $a_val;
}
ilObjUser::setCity (   $a_str)

set city public

Parameters
stringcity

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

Referenced by assignData().

{
$this->city = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setClientIP (   $a_str)

set client ip number public

Parameters
stringclient ip

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

Referenced by assignData().

{
$this->client_ip = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setComment (   $a_str)

set referral comment public

Parameters
stringhobby

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

Referenced by assignData().

{
$this->referral_comment = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setCountry (   $a_str)

Set country (free text)

public

Parameters
stringcountry

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

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

{
$this->country = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setCurrentLanguage (   $a_val)

Set current language.

Parameters
string$a_valcurrent language

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

References $_SESSION.

{
$_SESSION['lang'] = $a_val;
}
ilObjUser::setDelicious (   $a_delicious)

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

Referenced by assignData().

{
$this->delicious = $a_delicious;
}

+ Here is the caller graph for this function:

ilObjUser::setDepartment (   $a_str)

set department public

Parameters
stringdepartment

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

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

{
$this->department = $a_str;
}

+ Here is the caller graph for this function:

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.

References $ilDB, and ilObject\getId().

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

+ Here is the call graph for this function:

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.

References setPref().

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

+ Here is the call graph for this function:

ilObjUser::setEmail (   $a_str)

set email public

Parameters
stringemail address

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

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

{
$this->email = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setExternalAccount (   $a_str)

set external account

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

public

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

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

{
$this->ext_account = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setFax (   $a_str)

set fax public

Parameters
stringfax

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

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

{
$this->fax = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setFirstname (   $a_str)

set firstname public

Parameters
stringfirstname

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

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

{
$this->firstname = $a_str;
}

+ Here is the caller graph for this function:

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

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

But you may use the function in static manner. static

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

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

References $fullname, and $lastname.

Referenced by assignData().

{
$this->fullname = "";
if ($a_title)
{
$fullname = $a_title." ";
}
elseif ($this->utitle)
{
$this->fullname = $this->utitle." ";
}
if ($a_firstname)
{
$fullname .= $a_firstname." ";
}
elseif ($this->firstname)
{
$this->fullname .= $this->firstname." ";
}
if ($a_lastname)
{
return $fullname.$a_lastname;
}
$this->fullname .= $this->lastname;
}

+ Here is the caller graph for this function:

ilObjUser::setGender (   $a_str)

set gender public

Parameters
stringgender

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

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

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

+ Here is the caller graph for this function:

ilObjUser::setGeneralInterests ( array  $value = null)

Set general interests.

Parameters
array$value

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

Referenced by readMultiTextFields().

{
$this->interests_general = $value;
}

+ Here is the caller graph for this function:

ilObjUser::setHobby (   $a_str)

set hobby public

Parameters
stringhobby

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

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

{
$this->hobby = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setInactivationDate (   $inactivation_date)

setter for inactivation date

Parameters
string$inactivationDate

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

References $inactivation_date.

Referenced by assignData().

{
$this->inactivation_date = $inactivation_date;
}

+ Here is the caller graph for this function:

ilObjUser::setInstantMessengerId (   $a_im_type,
  $a_im_id 
)

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

Referenced by assignData().

{
$var = "im_".$a_im_type;
$this->$var = $a_im_id;
}

+ Here is the caller graph for this function:

ilObjUser::setInstitution (   $a_str)

set institution public

Parameters
stringinstitution

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

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

{
$this->institution = $a_str;
}

+ Here is the caller graph for this function:

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

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

Referenced by assignData().

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

+ Here is the caller graph for this function:

ilObjUser::setLanguage (   $a_str)

set user language public

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

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

References $_SESSION, and setPref().

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

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::setLastLogin (   $a_str)

set user's last login public

Parameters
stringlogin date

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

Referenced by assignData().

{
$this->last_login = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setLastname (   $a_str)

set lastame public

Parameters
stringlastname

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

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

{
$this->lastname = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setLastPasswordChangeToNow ( )

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

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

{
global $ilDB;
$this->setLastPasswordChangeTS( time() );
$query = "UPDATE usr_data SET last_password_change = %s " .
"WHERE usr_id = %s";
$affected = $ilDB->manipulateF($query,
array('integer','integer'),
array($this->getLastPasswordChangeTS(),$this->id));
if($affected) return true;
else return false;
}

+ Here is the call graph for this function:

ilObjUser::setLastPasswordChangeTS (   $a_last_password_change_ts)

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

Referenced by read(), and setLastPasswordChangeToNow().

{
$this->last_password_change_ts = $a_last_password_change_ts;
}

+ Here is the caller graph for this function:

ilObjUser::setLastUpdate (   $a_str)

set last update of user data set public

Parameters
stringdate

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

Referenced by assignData().

{
$this->last_update = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setLatitude (   $a_latitude)

Set Latitude.

Parameters
string$a_latitudeLatitude

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

Referenced by assignData().

{
$this->latitude = $a_latitude;
}

+ Here is the caller graph for this function:

ilObjUser::setLocationZoom (   $a_locationzoom)

Set Location Zoom.

Parameters
int$a_locationzoomLocation Zoom

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

Referenced by assignData().

{
$this->loc_zoom = $a_locationzoom;
}

+ Here is the caller graph for this function:

ilObjUser::setLogin (   $a_str)

set login / username public

Parameters
stringusername

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

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

{
$this->login = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setLoginAttempts (   $a_login_attempts)

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

Referenced by read().

{
$this->login_attempts = $a_login_attempts;
}

+ Here is the caller graph for this function:

ilObjUser::setLongitude (   $a_longitude)

Set Longitude.

Parameters
string$a_longitudeLongitude

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

Referenced by assignData().

{
$this->longitude = $a_longitude;
}

+ Here is the caller graph for this function:

ilObjUser::setLookingForHelp ( array  $value = null)

Set help looking for.

Parameters
array$value

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

Referenced by readMultiTextFields().

{
$this->interests_help_looking = $value;
}

+ Here is the caller graph for this function:

ilObjUser::setMatriculation (   $a_str)

set matriculation number public

Parameters
stringmatriculation number

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

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

{
$this->matriculation = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setOfferingHelp ( array  $value = null)

Set help offering.

Parameters
array$value

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

Referenced by readMultiTextFields().

{
$this->interests_help_offered = $value;
}

+ Here is the caller graph for this function:

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

set password public

Parameters
stringpasswd

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

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

{
$this->passwd = $a_str;
$this->passwd_type = $a_type;
}

+ Here is the caller graph for this function:

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

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

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

{
$this->password_encoding_type = $password_encryption_type;
}

+ Here is the caller graph for this function:

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

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

References $password_salt.

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

{
$this->password_salt = $password_salt;
}

+ Here is the caller graph for this function:

ilObjUser::setPhoneHome (   $a_str)

set home phone public

Parameters
stringhome phone

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

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

{
$this->phone_home = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setPhoneMobile (   $a_str)

set mobile phone public

Parameters
stringmobile phone

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

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

{
$this->phone_mobile = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setPhoneOffice (   $a_str)

set office phone public

Parameters
stringoffice phone

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

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

{
$this->phone_office = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setPref (   $a_keyword,
  $a_value 
)

set a user preference

Parameters
stringname of parameter
stringvalue public

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

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

{
if ($a_keyword != "")
{
$this->prefs[$a_keyword] = $a_value;
}
}

+ Here is the caller graph for this function:

ilObjUser::setProfileIncomplete (   $a_prof_inc)

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

Referenced by assignData().

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

+ Here is the caller graph for this function:

ilObjUser::setSelectedCountry (   $a_val)

Set selected country (selection drop down)

Parameters
stringselected country

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

Referenced by assignData().

{
$this->sel_country = $a_val;
}

+ Here is the caller graph for this function:

ilObjUser::setSkin (   $a_str)

set user skin (template set) public

Parameters
stringdirectory name of template set

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

{
// TODO: exception handling (dir exists)
$this->skin = $a_str;
}
ilObjUser::setStreet (   $a_str)

set street public

Parameters
stringstreet

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

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

{
$this->street = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setTimeLimitFrom (   $a_from)

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

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

{
$this->time_limit_from = $a_from;
}

+ Here is the caller graph for this function:

ilObjUser::setTimeLimitMessage (   $a_time_limit_message)

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

Referenced by assignData().

{
return $this->time_limit_message = $a_time_limit_message;
}

+ Here is the caller graph for this function:

ilObjUser::setTimeLimitOwner (   $a_owner)

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

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

{
$this->time_limit_owner = $a_owner;
}

+ Here is the caller graph for this function:

ilObjUser::setTimeLimitUnlimited (   $a_unlimited)

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

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

{
$this->time_limit_unlimited = $a_unlimited;
}

+ Here is the caller graph for this function:

ilObjUser::setTimeLimitUntil (   $a_until)

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

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

{
$this->time_limit_until = $a_until;
}

+ Here is the caller graph for this function:

ilObjUser::setUserDefinedData (   $a_data)

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

{
if(!is_array($a_data))
{
return false;
}
foreach($a_data as $field => $data)
{
#$new_data[$field] = ilUtil::stripSlashes($data);
// Assign it directly to avoid update problems of unchangable fields
$this->user_defined_data['f_'.$field] = $data;
}
#$this->user_defined_data = $new_data;
return true;
}
ilObjUser::setUTitle (   $a_str)

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

Parameters
stringtitle

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

Referenced by assignData().

{
$this->utitle = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::setZipcode (   $a_str)

set zipcode public

Parameters
stringzipcode

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

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

{
$this->zipcode = $a_str;
}

+ Here is the caller graph for this function:

ilObjUser::syncActive ( )

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

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

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

{
global $ilAuth;
$storedActive = 0;
if ($this->getStoredActive($this->id))
{
$storedActive = 1;
}
$currentActive = 0;
if ($this->active)
{
$currentActive = 1;
}
if ((!empty($storedActive) && empty($currentActive)) ||
(empty($storedActive) && !empty($currentActive)))
{
$this->setActive($currentActive, $this->getUserIdByLogin(ilObjUser::getLoginFromAuth()));
}
}

+ Here is the call graph for this function:

ilObjUser::updateLogin (   $a_login)

update login name

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

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

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

{
global $ilDB, $ilSetting;
if(func_num_args() != 1)
{
return false;
}
if(!isset($a_login))
{
return false;
}
$former_login = self::_lookupLogin($this->getId());
// Update not necessary
if(0 == strcmp($a_login, $former_login))
{
return false;
}
try
{
$last_history_entry = ilObjUser::_getLastHistoryDataByUserId($this->getId());
}
catch(ilUserException $e) { $last_history_entry = null; }
// throw exception if the desired loginame is already in history and it is not allowed to reuse it
if((int)$ilSetting->get('allow_change_loginname') &&
(int)$ilSetting->get('reuse_of_loginnames') == 0 &&
{
throw new ilUserException($this->lng->txt('loginname_already_exists'));
}
else if((int)$ilSetting->get('allow_change_loginname') &&
(int)$ilSetting->get('loginname_change_blocking_time') &&
is_array($last_history_entry) &&
$last_history_entry[1] + (int)$ilSetting->get('loginname_change_blocking_time') > time())
{
include_once 'Services/Calendar/classes/class.ilDate.php';
throw new ilUserException(
sprintf(
$this->lng->txt('changing_loginname_not_possible_info'),
new ilDateTime($last_history_entry[1], IL_CAL_UNIX)),
new ilDateTime(($last_history_entry[1] + (int)$ilSetting->get('loginname_change_blocking_time')), IL_CAL_UNIX))
)
);
}
else
{
// log old loginname in history
if((int)$ilSetting->get('allow_change_loginname') &&
(int)$ilSetting->get('create_history_loginname'))
{
ilObjUser::_writeHistory($this->getId(), $former_login);
}
//update login
$this->login = $a_login;
$ilDB->manipulateF('
UPDATE usr_data
SET login = %s
WHERE usr_id = %s',
array('text', 'integer'), array($this->getLogin(), $this->getId()));
include_once 'Services/Contact/classes/class.ilAddressbook.php';
ilAddressbook::onLoginNameChange($former_login, $this->getLogin());
}
return true;
}

+ Here is the call graph for this function:

ilObjUser::updateMultiTextFields (   $a_create = false)

Write multi-text values to DB.

Parameters
bool$a_create

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

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

{
global $ilDB;
if(!$this->getId())
{
return;
}
if(!$a_create)
{
}
$map = array(
"interests_general" => $this->getGeneralInterests(),
"interests_help_offered" => $this->getOfferingHelp(),
"interests_help_looking" => $this->getLookingForHelp()
);
foreach($map as $id => $values)
{
if(is_array($values) && sizeof($values))
{
foreach($values as $value)
{
$value = trim($value);
if($value)
{
$ilDB->manipulate("INSERT usr_data_multi".
" (usr_id,field_id,value) VALUES".
" (".$ilDB->quote($this->getId(), "integer").
",".$ilDB->quote($id, "text").
",".$ilDB->quote($value, "text").
")");
}
}
}
}
}

+ Here is the call graph for this function:

ilObjUser::updateUserDefinedFields ( )

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

References $ilDB, and ilObject\getId().

{
global $ilDB;
$fields = '';
$field_def = array();
include_once("./Services/User/classes/class.ilUserDefinedData.php");
$udata = new ilUserDefinedData($this->getId());
foreach($this->user_defined_data as $field => $value)
{
if($field != 'usr_id')
{
// $field_def[$field] = array('text',$value);
$udata->set($field, $value);
}
}
$udata->update();
/* if(!$field_def)
{
return true;
}
$query = "SELECT usr_id FROM udf_data WHERE usr_id = ".$ilDB->quote($this->getId(),'integer');
$res = $ilDB->query($query);
if($res->numRows())
{
// Update
$ilDB->update('udf_data',$field_def,array('usr_id' => array('integer',$this->getId())));
}
else
{
$field_def['usr_id'] = array('integer',$this->getId());
$ilDB->insert('udf_data',$field_def);
}
*/
return true;
}

+ Here is the call graph for this function:

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

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

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

Referenced by ilInfoScreenGUI\addObjectSections(), and ilSoapLearningProgressAdministration\deleteProgress().

{
global $ilDB;
$query = 'SELECT count(*) num FROM object_data od '.
'JOIN usr_data ud ON obj_id = usr_id '.
'WHERE '.$ilDB->in('obj_id',$a_usr_ids,false,'integer').' ';
$res = $ilDB->query($query);
$num_rows =$res->fetchRow(DB_FETCHMODE_OBJECT)->num;
return $num_rows == count((array) $a_usr_ids);
}

+ Here is the caller graph for this function:

ilObjUser::writeAccepted ( )

write accept date of user agreement to db

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

References $ilDB, and ilObject\getId().

Referenced by ilTermsOfServiceHelper\trackAcceptance().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::writePref (   $a_keyword,
  $a_value 
)

write userpref to user table private

Parameters
stringkeyword
stringvalue

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

References _writePref(), and setPref().

Referenced by activateDeletionFlag(), and removeDeletionFlag().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUser::writePrefs ( )

write all userprefs private

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

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

{
global $ilDB;
foreach ($this->prefs as $keyword => $value)
{
self::_writePref($this->id, $keyword, $value);
}
}

+ Here is the call graph for this function:

Field Documentation

ilObjUser::$agree_date = null

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

Referenced by getAgreeDate().

ilObjUser::$approve_date = null

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

Referenced by getApproveDate().

ilObjUser::$auth_mode

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

Referenced by getAuthMode().

ilObjUser::$birthday
protected

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

Referenced by getBirthday().

ilObjUser::$city

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

Referenced by getCity().

ilObjUser::$client_ip

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

Referenced by getClientIP().

ilObjUser::$country

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

Referenced by getCountry().

ilObjUser::$default_role

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

ilObjUser::$delicious

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

Referenced by getDelicious().

ilObjUser::$department

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

Referenced by getDepartment().

ilObjUser::$email

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

Referenced by getEmail().

ilObjUser::$fax

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

Referenced by getFax().

ilObjUser::$firstname

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

Referenced by getFirstname().

ilObjUser::$fullname

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

Referenced by _lookupFullname(), and setFullname().

ilObjUser::$gender

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

Referenced by getGender().

ilObjUser::$hobby

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

Referenced by getHobby().

ilObjUser::$ilias
ilObjUser::$im_aim

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

ilObjUser::$im_icq

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

ilObjUser::$im_jabber

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

ilObjUser::$im_msn

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

ilObjUser::$im_skype

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

ilObjUser::$im_voip

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

ilObjUser::$im_yahoo

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

ilObjUser::$inactivation_date = null
protected

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

Referenced by getInactivationDate(), and setInactivationDate().

ilObjUser::$institution

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

Referenced by getInstitution().

ilObjUser::$interests_general
protected

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

Referenced by getGeneralInterests().

ilObjUser::$interests_help_looking
protected

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

Referenced by getLookingForHelp().

ilObjUser::$interests_help_offered
protected

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

Referenced by getOfferingHelp().

ilObjUser::$is_desktop_item_cache
static

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

ilObjUser::$is_desktop_item_loaded
static

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

ilObjUser::$is_self_registered = false
private

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

Referenced by isSelfRegistered().

ilObjUser::$last_password_change_ts

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

Referenced by getLastPasswordChangeTS().

ilObjUser::$lastname

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

Referenced by getLastname(), and setFullname().

ilObjUser::$latitude

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

Referenced by getLatitude().

ilObjUser::$loc_zoom

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

Referenced by getLocationZoom().

ilObjUser::$login

all user related data in single vars public

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

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

ilObjUser::$login_attempts

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

Referenced by _getLoginAttempts(), and getLoginAttempts().

ilObjUser::$longitude

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

Referenced by getLongitude().

ilObjUser::$matriculation

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

Referenced by getMatriculation().

ilObjUser::$passwd
protected

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

Referenced by getPasswd().

ilObjUser::$passwd_type
protected

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

Referenced by getPasswdType().

ilObjUser::$password_encoding_type
protected

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

Referenced by getPasswordEncodingType().

ilObjUser::$password_salt = null
protected

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

Referenced by getPasswordSalt(), and setPasswordSalt().

ilObjUser::$personal_image_cache = array()
staticprotected

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

ilObjUser::$phone_home

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

Referenced by getPhoneHome().

ilObjUser::$phone_mobile

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

Referenced by getPhoneMobile().

ilObjUser::$phone_office

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

Referenced by getPhoneOffice().

ilObjUser::$prefs

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

Referenced by _getPreferences(), and readPrefs().

ilObjUser::$referral_comment

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

Referenced by getComment().

ilObjUser::$sel_country

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

Referenced by getSelectedCountry().

ilObjUser::$skin

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

Referenced by __construct().

ilObjUser::$street

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

Referenced by getStreet().

ilObjUser::$user_defined_data = array()

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

ilObjUser::$utitle

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

Referenced by getUTitle().

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: