ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
shibUser Class Reference

Class shibUser. More...

+ Inheritance diagram for shibUser:
+ Collaboration diagram for shibUser:

Public Member Functions

 updateFields ()
 
 createFields ()
 
 create ()
 create More...
 
 isNew ()
 
- Public Member Functions inherited from ilObjUser
 __construct ($a_user_id=0, $a_call_by_reference=false)
 Constructor @access public. More...
 
 read ()
 loads a record "user" from database @access private More...
 
 getPasswordEncodingType ()
 
 setPasswordEncodingType ($password_encryption_type)
 
 getPasswordSalt ()
 
 setPasswordSalt ($password_salt)
 
 assignData ($a_data)
 loads a record "user" from array @access public More...
 
 writeAccepted ()
 write accept date of user agreement to db More...
 
 refreshLogin ()
 updates the login data of a "user" // TODO set date with now() should be enough @access public More...
 
 updateLogin ($a_login)
 update login name More...
 
 writePref ($a_keyword, $a_value)
 write userpref to user table @access private More...
 
 deletePref ($a_keyword)
 Deletes a userpref value of the user from the database @access public. More...
 
 writePrefs ()
 write all userprefs @access private More...
 
 getTimeZone ()
 get timezone of user More...
 
 getTimeFormat ()
 get time format More...
 
 getDateFormat ()
 get date format More...
 
 setPref ($a_keyword, $a_value)
 set a user preference More...
 
 getPref ($a_keyword)
 get a user preference More...
 
 readPrefs ()
 get all user preferences @access private More...
 
 delete ()
 deletes a user @access public More...
 
 setFullname ($a_title="", $a_firstname="", $a_lastname="")
 builds a string with title + firstname + lastname method is used to build fullname in member variable $this->fullname. More...
 
 getFullname ($a_max_strlen=0)
 get fullname @access public More...
 
 setLogin ($a_str)
 set login / username @access public More...
 
 getLogin ()
 get login / username @access public More...
 
 setPasswd ($a_str, $a_type=IL_PASSWD_PLAIN)
 set password @access public More...
 
 getPasswd ()
 get password More...
 
 getPasswdType ()
 get password type More...
 
 setGender ($a_str)
 set gender @access public More...
 
 getGender ()
 get gender @access public More...
 
 setUTitle ($a_str)
 set user title (note: don't mix up this method with setTitle() that is derived from ilObject and sets the user object's title) @access public More...
 
 getUTitle ()
 get user title (note: don't mix up this method with getTitle() that is derived from ilObject and gets the user object's title) @access public More...
 
 setFirstname ($a_str)
 set firstname @access public More...
 
 getFirstname ()
 get firstname @access public More...
 
 setLastname ($a_str)
 set lastame @access public More...
 
 getLastname ()
 get lastname @access public More...
 
 setInstitution ($a_str)
 set institution @access public More...
 
 getInstitution ()
 get institution @access public More...
 
 setDepartment ($a_str)
 set department @access public More...
 
 getDepartment ()
 get department @access public More...
 
 setStreet ($a_str)
 set street @access public More...
 
 getStreet ()
 get street @access public More...
 
 setCity ($a_str)
 set city @access public More...
 
 getCity ()
 get city @access public More...
 
 setZipcode ($a_str)
 set zipcode @access public More...
 
 getZipcode ()
 get zipcode @access public More...
 
 setCountry ($a_str)
 Set country (free text) More...
 
 getCountry ()
 Get country (free text) More...
 
 setSelectedCountry ($a_val)
 Set selected country (selection drop down) More...
 
 getSelectedCountry ()
 Get selected country (selection drop down) More...
 
 setPhoneOffice ($a_str)
 set office phone @access public More...
 
 getPhoneOffice ()
 get office phone @access public More...
 
 setPhoneHome ($a_str)
 set home phone @access public More...
 
 getPhoneHome ()
 get home phone @access public More...
 
 setPhoneMobile ($a_str)
 set mobile phone @access public More...
 
 getPhoneMobile ()
 get mobile phone @access public More...
 
 setFax ($a_str)
 set fax @access public More...
 
 getFax ()
 get fax @access public More...
 
 setClientIP ($a_str)
 set client ip number @access public More...
 
 getClientIP ()
 get client ip number @access public More...
 
 setMatriculation ($a_str)
 set matriculation number @access public More...
 
 getMatriculation ()
 get matriculation number @access public More...
 
 setEmail ($a_str)
 set email @access public More...
 
 getEmail ()
 get email address @access public More...
 
 getSecondEmail ()
 
 setSecondEmail ($second_email)
 
 setHobby ($a_str)
 set hobby @access public More...
 
 getHobby ()
 get hobby @access public More...
 
 setLanguage ($a_str)
 set user language @access public More...
 
 getLanguage ()
 returns a 2char-language-string @access public More...
 
 setDiskQuota ($a_disk_quota)
 Sets the minimal disk quota imposed by this user account. More...
 
 getDiskQuota ()
 Returns the minimal disk quota imposed by this user account. More...
 
 getPersonalWorkspaceDiskQuota ()
 
 setLastPasswordChangeTS ($a_last_password_change_ts)
 
 getLastPasswordChangeTS ()
 
 getPasswordPolicyResetStatus ()
 
 setPasswordPolicyResetStatus (bool $status)
 
 getCurrentLanguage ()
 returns the current language (may differ from user's pref setting!) More...
 
 setCurrentLanguage ($a_val)
 Set current language. More...
 
 setLastLogin ($a_str)
 set user's last login @access public More...
 
 getLastLogin ()
 returns last login date @access public More...
 
 setFirstLogin ($a_str)
 set user's first login More...
 
 getFirstLogin ()
 returns first login date More...
 
 setLastProfilePrompt ($a_str)
 set user's last profile prompt More...
 
 getLastProfilePrompt ()
 returns user's last profile prompt More...
 
 setLastUpdate ($a_str)
 set last update of user data set @access public More...
 
 getLastUpdate ()
 
 setComment ($a_str)
 set referral comment @access public More...
 
 getComment ()
 get referral comment @access public More...
 
 setApproveDate ($a_str)
 set date the user account was activated null indicates that the user has not yet been activated @access public More...
 
 getApproveDate ()
 get the date when the user account was approved @access public More...
 
 getAgreeDate ()
 get the date when the user accepted the user agreement @access public More...
 
 setAgreeDate ($a_str)
 set date the user account was accepted by the user nullindicates that the user has not accepted his account @access public More...
 
 setActive ($a_active, $a_owner=0)
 set user active state and updates system fields appropriately @access public More...
 
 getActive ()
 get user active state @access public More...
 
 syncActive ()
 synchronizes current and stored user active values for the owner value to be set correctly, this function should only be called when an admin is approving a user account @access public More...
 
 getStoredActive ($a_id)
 get user active state More...
 
 setSkin ($a_str)
 set user skin (template set) @access public More...
 
 setTimeLimitOwner ($a_owner)
 
 getTimeLimitOwner ()
 
 setTimeLimitFrom ($a_from)
 
 getTimeLimitFrom ()
 
 setTimeLimitUntil ($a_until)
 
 getTimeLimitUntil ()
 
 setTimeLimitUnlimited ($a_unlimited)
 
 getTimeLimitUnlimited ()
 
 setTimeLimitMessage ($a_time_limit_message)
 
 getTimeLimitMessage ()
 
 setLoginAttempts ($a_login_attempts)
 
 getLoginAttempts ()
 
 checkTimeLimit ()
 
 setProfileIncomplete ($a_prof_inc)
 
 getProfileIncomplete ()
 
 isPasswordChangeDemanded ()
 
 isPasswordExpired ()
 
 getPasswordAge ()
 
 setLastPasswordChangeToNow ()
 
 resetLastPasswordChange ()
 
 setLatitude ($a_latitude)
 Set Latitude. More...
 
 getLatitude ()
 Get Latitude. More...
 
 setLongitude ($a_longitude)
 Set Longitude. More...
 
 getLongitude ()
 Get Longitude. More...
 
 setLocationZoom ($a_locationzoom)
 Set Location Zoom. More...
 
 getLocationZoom ()
 Get Location Zoom. More...
 
 checkUserId ()
 
 isCurrentUserActive ()
 
 getLoginByUserId ($a_userid)
 
 addObjectToClipboard ( $a_item_id, $a_type, $a_title, $a_parent=0, $a_time=0, $a_order_nr=0)
 add an item to user's personal clipboard More...
 
 addToPCClipboard ($a_content, $a_time, $a_nr)
 Add a page content item to PC clipboard (should go to another class) More...
 
 getPCClipboardContent ()
 Add a page content item to PC clipboard (should go to another class) More...
 
 clipboardHasObjectsOfType ($a_type)
 Check whether clipboard has objects of a certain type. More...
 
 clipboardDeleteObjectsOfType ($a_type)
 Delete objects of type for user. More...
 
 clipboardDeleteAll ()
 Delete objects of type for user. More...
 
 getClipboardObjects ($a_type="", $a_top_nodes_only=false)
 get all clipboard objects of user and specified type More...
 
 getClipboardChilds ($a_parent, $a_insert_time)
 Get childs of an item. More...
 
 removeObjectFromClipboard ($a_item_id, $a_type)
 remove object from user's personal clipboard More...
 
 getOrgUnitsRepresentation ()
 
 setAuthMode ($a_str)
 set auth mode @access public More...
 
 getAuthMode ($a_auth_key=false)
 get auth mode @access public More...
 
 setExternalAccount ($a_str)
 set external account More...
 
 getExternalAccount ()
 get external account More...
 
 getPersonalPicturePath ($a_size="small", $a_force_pic=false)
 Get path to personal picture. More...
 
 getAvatar ()
 
 removeUserPicture ($a_do_update=true)
 Remove user picture. More...
 
 setUserDefinedData ($a_data)
 
 getUserDefinedData ()
 
 updateUserDefinedFields ()
 
 readUserDefinedFields ()
 
 addUserDefinedFieldEntry ()
 
 deleteUserDefinedFieldEntries ()
 
 hasPublicProfile ()
 returns true if public is profile, false otherwise More...
 
 getPublicName ()
 returns firstname lastname and login if profile is public, login otherwise More...
 
 setBirthday ($a_birthday)
 
 getBirthday ()
 
 resetOwner ()
 
 isCaptchaVerified ()
 Is user captcha verified? More...
 
 setCaptchaVerified ($a_val)
 Set captcha verified. More...
 
 exportPersonalData ()
 Export personal data. More...
 
 getPersonalDataExportFile ()
 Get personal data export file. More...
 
 sendPersonalDataFile ()
 Send personal data file. More...
 
 importPersonalData ( $a_file, $a_profile_data, $a_settings, $a_notes, $a_calendar)
 Import personal data. More...
 
 setInactivationDate ($inactivation_date)
 setter for inactivation date More...
 
 getInactivationDate ()
 getter for inactivation date More...
 
 hasToAcceptTermsOfService ()
 
 hasToAcceptTermsOfServiceInSession ($status=null)
 
 isAnonymous ()
 
 activateDeletionFlag ()
 
 removeDeletionFlag ()
 
 hasDeletionFlag ()
 
 setIsSelfRegistered ($status)
 
 isSelfRegistered ()
 
 setGeneralInterests (array $value=null)
 Set general interests. More...
 
 getGeneralInterests ()
 Get general interests. More...
 
 getGeneralInterestsAsText ()
 Get general interests as plain text. More...
 
 setOfferingHelp (array $value=null)
 Set help offering. More...
 
 getOfferingHelp ()
 Get help offering. More...
 
 getOfferingHelpAsText ()
 Get help offering as plain text. More...
 
 setLookingForHelp (array $value=null)
 Set help looking for. More...
 
 getLookingForHelp ()
 Get help looking for. More...
 
 getLookingForHelpAsText ()
 Get help looking for as plain text. More...
 
 updateMultiTextFields ($a_create=false)
 Write multi-text values to DB. More...
 
- Public Member Functions inherited from ilObject
 __construct ($a_id=0, $a_reference=true)
 Constructor @access public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ()
 read object data from db into object More...
 
 getId ()
 get object id @access public More...
 
 setId ($a_id)
 set object id @access public More...
 
 setRefId ($a_id)
 set reference id @access public More...
 
 getRefId ()
 get reference id @access public More...
 
 getType ()
 get object type @access public More...
 
 setType ($a_type)
 set object type @access public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title @access public More...
 
 getUntranslatedTitle ()
 get untranslated object title @access public More...
 
 setTitle ($a_title)
 set object title More...
 
 getDescription ()
 get object description More...
 
 setDescription ($a_desc)
 set object description More...
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 get import id More...
 
 setImportId ($a_import_id)
 set import id More...
 
 setOfflineStatus ($a_status)
 Set offline status. More...
 
 getOfflineStatus ()
 Get offline status. More...
 
 supportsOfflineHandling ()
 Check whether object supports offline handling. More...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date @access public More...
 
 getLastUpdateDate ()
 get last update date @access public More...
 
 getDiskUsage ()
 Gets the disk usage of the object in bytes. More...
 
 create ()
 create More...
 
 update ()
 update object in db More...
 
 MDUpdateListener ($a_element)
 Meta data update listener. More...
 
 createMetaData ()
 create meta data entry More...
 
 updateMetaData ()
 update meta data entry More...
 
 deleteMetaData ()
 delete meta data entry More...
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 setParentRolePermissions ($a_parent_ref)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) @access public More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 getPossibleSubObjects ($a_filter=true)
 get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static buildInstance (shibServerData $shibServerData)
 
- Static Public Member Functions inherited from ilObjUser
static _lookupFullname ($a_user_id)
 Lookup Full Name. More...
 
static _lookupEmail ($a_user_id)
 Lookup email. More...
 
static _lookupSecondEmail ($a_user_id)
 Lookup second e-mail. More...
 
static _lookupGender ($a_user_id)
 Lookup gender. More...
 
static _lookupClientIP ($a_user_id)
 Lookup client ip. More...
 
static _lookupName ($a_user_id)
 lookup user name More...
 
static _lookupFields ($a_user_id)
 lookup fields (deprecated; use more specific methods instead) More...
 
static _lookupLogin ($a_user_id)
 lookup login More...
 
static _lookupExternalAccount ($a_user_id)
 lookup external account for login and authmethod More...
 
static _lookupId ($a_user_str)
 Lookup id by login. More...
 
static _lookupLastLogin ($a_user_id)
 lookup last login More...
 
static _lookupFirstLogin ($a_user_id)
 lookup first login More...
 
static _doesLoginnameExistInHistory ($a_login)
 Checks wether the passed loginname already exists in history. More...
 
static _getLastHistoryDataByUserId ($a_usr_id)
 Returns the last used loginname and the changedate of the passed user_id. More...
 
static _deleteAllPref ($a_user_id)
 Deletes a userpref value of the user from the database @access public. More...
 
static _writePref ($a_usr_id, $a_keyword, $a_value)
 
static _lookupPref ($a_usr_id, $a_keyword)
 
static lookupMatriculation ($a_usr_id)
 Lookup matriculation. More...
 
static _lookupLanguage ($a_usr_id)
 
static _writeExternalAccount ($a_usr_id, $a_ext_id)
 
static _writeAuthMode ($a_usr_id, $a_auth_mode)
 
static _lookupActive ($a_usr_id)
 Check user account active. More...
 
static hasActiveSession ($a_user_id, $a_session_id)
 Check for simultaneous login. More...
 
static toUsernameWithoutDomain ($a_login)
 Static function removes Microsoft domain name from username webdav related. More...
 
static getUserIdByLogin ($a_login)
 
static getUserIdsByEmail ($a_email)
 STATIC METHOD get all user_ids of an email address. More...
 
static getUserLoginsByEmail ($a_email)
 get all user login names of an email address More...
 
static searchUsers ($a_search_str, $active=1, $a_return_ids_only=false, $filter_settings=false)
 STATIC METHOD get the user_ids which correspond a search string. More...
 
static _readUsersProfileData ($a_user_ids)
 STATIC METHOD get user data of selected users. More...
 
static _getAllUserData ($a_fields=null, $active=-1)
 STATIC METHOD get all user data. More...
 
static _getNumberOfUsersForStyle ($a_skin, $a_style)
 skins and styles More...
 
static _getAllUserAssignedStyles ()
 skins and styles More...
 
static _moveUsersToStyle ($a_from_skin, $a_from_style, $a_to_skin, $a_to_style)
 skins and styles More...
 
static _getUsersForClipboadObject ($a_type, $a_id)
 get all users, that have a certain object within their clipboard More...
 
static _getImportedUserId ($i2_id)
 
static lookupOrgUnitsRepresentation ($a_usr_id)
 lokup org unit representation More...
 
static _getExternalAccountsByAuthMode ($a_auth_mode, $a_read_auth_default=false)
 Get list of external account by authentication method Note: If login == ext_account for two user with auth_mode 'default' and auth_mode 'ldap' The ldap auth mode chosen. More...
 
static _toggleActiveStatusOfUsers ($a_usr_ids, $a_status)
 Toggle active status of users. More...
 
static _lookupAuthMode ($a_usr_id)
 lookup auth mode More...
 
static _checkExternalAuthAccount ($a_auth, $a_account, $tryFallback=true)
 check whether external account and authentication method matches with a user More...
 
static _getNumberOfUsersPerAuthMode ()
 get number of users per auth mode More...
 
static _getLocalAccountsForEmail ($a_email)
 check whether external account and authentication method matches with a user More...
 
static _uploadPersonalPicture ($tmp_file, $obj_id)
 Create a personal picture image file from a temporary image file. More...
 
static _getAvatar ($a_usr_id)
 
static _getPersonalPicturePath ( $a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false)
 Get path to personal picture. More...
 
static copyProfilePicturesToDirectory ($a_user_id, $a_dir)
 Get profile picture direcotory. More...
 
static _lookupFeedHash ($a_user_id, $a_create=false)
 Lookup news feed hash for user. More...
 
static _getFeedPass ($a_user_id)
 Lookup news feed password for user. More...
 
static _setFeedPass ($a_user_id, $a_password)
 Set news feed password for user. More...
 
static _loginExists ($a_login, $a_user_id=0)
 check if a login name already exists You may exclude a user from the check by giving his user id as 2nd paramter @access public @access static More...
 
static _externalAccountExists ($a_external_account, $a_auth_mode)
 Check if an external account name already exists. More...
 
static _getUsersForRole ($role_id, $active=-1)
 return array of complete users which belong to a specific role More...
 
static _getUsersForFolder ($ref_id, $active)
 get users for a category or from system folder More...
 
static _getUsersForGroup ($a_mem_ids, $active=-1)
 return user data for group members More...
 
static _getUsersForIds ($a_mem_ids, $active=-1, $timelimitowner=-1)
 return user data for given user id More...
 
static _getUserData ($a_internalids)
 return user data for given user ids More...
 
static _getPreferences ($user_id)
 get preferences for user More...
 
static getUserSubsetByPreferenceValue ($a_user_ids, $a_keyword, $a_val)
 For a given set of user IDs return a subset that has a given user preference set. More...
 
static _resetLoginAttempts ($a_usr_id)
 
static _getLoginAttempts ($a_usr_id)
 
static _incrementLoginAttempts ($a_usr_id)
 
static _setUserInactive ($a_usr_id)
 
static _writeHistory ($a_usr_id, $a_login)
 
static _generateRegistrationHash ($a_usr_id)
 Generates a unique hashcode for activating a user profile after registration. More...
 
static _verifyRegistrationHash ($a_hash)
 Verifies a registration hash. More...
 
static getUserIdsByInactivityPeriod (int $periodInDays)
 Get ids of all users that have been inactive for at least the given period. More...
 
static getUserIdsNeverLoggedIn (int $thresholdInDays)
 Get ids of all users that have never logged in. More...
 
static _getUserIdsByInactivationPeriod ($period)
 get ids of all users that have been inactivated since at least the given period More...
 
static _updateLastLogin ($a_usr_id, $a_last_login=null)
 STATIC METHOD updates the last_login field of user with given id to given or current date. More...
 
static getFirstLettersOfLastnames (?array $user_ids=null)
 Get first letters of all lastnames. More...
 
static userExists ($a_usr_ids=array())
 
static getUsersAgreed ($a_agreed=true, $a_users=null)
 Get users that have or have not agreed to the user agreement. More...
 
static _isAnonymous ($usr_id)
 
static findInterests ($a_term, $a_user_id=null, $a_field_id=null)
 
static getProfileStatusOfUsers ($a_user_ids)
 Get profile status. More...
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId ($a_import_id)
 
static _lookupImportId ($a_obj_id)
 
static _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id More...
 
static _getIdForImportId ($a_import_id)
 get current object id for import id (static) More...
 
static _getAllReferences ($a_id)
 get all reference ids of object More...
 
static _lookupTitle ($a_id)
 lookup object title More...
 
static lookupOfflineStatus ($a_obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner ($a_id)
 lookup object owner More...
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 lookup object description More...
 
static _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update More...
 
static _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects. More...
 
static _lookupObjId ($a_id)
 
static _setDeletedDate ($a_ref_id, $a_deleted_by)
 
static setDeletedDates ($a_ref_ids, $a_user_id)
 Set deleted date. More...
 
static _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _writeTitle ($a_obj_id, $a_title)
 write title to db (static) More...
 
static _writeDescription ($a_obj_id, $a_desc)
 write description to db (static) More...
 
static _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static) More...
 
static _lookupType ($a_id, $a_reference=false)
 lookup object type More...
 
static _isInTrash ($a_ref_id)
 checks wether object is in trash More...
 
static _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash More...
 
static _lookupObjectId ($a_ref_id)
 lookup object id More...
 
static _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type More...
 
static _exists ($a_id, $a_reference=false, $a_type=null)
 checks if an object exists in object_data@access public More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection. More...
 
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $a_obj_ids)
 Get long description data. More...
 
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns. More...
 
static fixMissingTitles ($a_type, array &$a_obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate ($a_id)
 Lookup creation date. More...
 
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course. More...
 

Protected Member Functions

 returnNewLoginName ()
 
- Protected Member Functions inherited from ilObjUser
 buildTextFromArray ($a_attr)
 Convert multi-text values to plain text. More...
 
 readMultiTextFields ()
 Fetch multi-text values from DB. More...
 
 deleteMultiTextFields ()
 Remove multi-text values from DB. More...
 

Static Protected Member Functions

static cleanName ($name)
 

Protected Attributes

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

Additional Inherited Members

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

Detailed Description

Class shibUser.

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 10 of file class.shibUser.php.

Member Function Documentation

◆ buildInstance()

static shibUser::buildInstance ( shibServerData  $shibServerData)
static
Parameters
shibServerData$shibServerData
Returns
shibUser

Definition at line 24 of file class.shibUser.php.

25 {
26 $shibUser = new self();
27 $shibUser->shibServerData = $shibServerData;
28 $ext_id = $shibUser->shibServerData->getLogin();
29 $shibUser->setExternalAccount($ext_id);
30 $existing_usr_id = self::getUsrIdByExtId($ext_id);
31 if ($existing_usr_id) {
32 $shibUser->setId($existing_usr_id);
33 $shibUser->read();
34 }
35 $shibUser->setAuthMode('shibboleth');
36
37 return $shibUser;
38 }

References $shibServerData.

Referenced by ilAuthProviderShibboleth\doAuthentication().

+ Here is the caller graph for this function:

◆ cleanName()

static shibUser::cleanName (   $name)
staticprotected
Parameters
$name
Returns
mixed

Definition at line 187 of file class.shibUser.php.

188 {
189 $name = strtolower(strtr(utf8_decode($name), utf8_decode('ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ'), 'SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy'));
190
191 return $name;
192 }
if($format !==null) $name
Definition: metadata.php:230

References $name.

Referenced by returnNewLoginName().

+ Here is the caller graph for this function:

◆ create()

shibUser::create ( )

create

note: title, description and type should be set when this function is called

@access public

Returns
integer object id

Reimplemented from ilObject.

Definition at line 131 of file class.shibUser.php.

132 {
134 if ($c->isActivateNew()) {
135 $this->setActive(false);
136 require_once('./Services/Registration/classes/class.ilRegistrationMailNotification.php');
137 require_once('./Services/Registration/classes/class.ilRegistrationSettings.php');
138 $ilRegistrationSettings = new ilRegistrationSettings();
139 $mail = new ilRegistrationMailNotification();
141 $mail->setRecipients($ilRegistrationSettings->getApproveRecipients());
142 $mail->setAdditionalInformation(array('usr' => $this));
143 $mail->send();
144 }
145
146 if ($this->getLogin() != '' and $this->getLogin() != '.') {
147 parent::create();
148 } else {
149 throw new ilUserException('No Login-name created');
150 }
151 }
getLogin()
get login / username @access public
setActive($a_active, $a_owner=0)
set user active state and updates system fields appropriately @access public
Class ilObjAuthSettingsGUI.
Class for user related exception handling in ILIAS.
static getInstance()

References Vendor\Package\$c, shibConfig\getInstance(), ilObjUser\getLogin(), ilObjUser\setActive(), and ilRegistrationMailNotification\TYPE_NOTIFICATION_CONFIRMATION.

+ Here is the call graph for this function:

◆ createFields()

shibUser::createFields ( )

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

100 {
101 $this->setFirstname($this->shibServerData->getFirstname());
102 $this->setLastname($this->shibServerData->getLastname());
103 $this->setLogin($this->returnNewLoginName());
105 $this->setGender($this->shibServerData->getGender());
107 $this->setTitle($this->shibServerData->getTitle());
110 $this->setStreet($this->shibServerData->getStreet());
111 $this->setZipcode($this->shibServerData->getZipcode());
112 $this->setCountry($this->shibServerData->getCountry());
114 $this->setPhoneHome($this->shibServerData->getPhoneHome());
116 $this->setFax($this->shibServerData->getFax());
118 $this->setEmail($this->shibServerData->getEmail());
119 $this->setHobby($this->shibServerData->getHobby());
120 $this->setTitle($this->getFullname());
121 $this->setDescription($this->getEmail());
122 $this->setLanguage($this->shibServerData->getLanguage());
123 $this->setTimeLimitOwner(7);
124 $this->setTimeLimitUnlimited(1);
125 $this->setTimeLimitFrom(time());
126 $this->setTimeLimitUntil(time());
127 $this->setActive(true);
128 }
const IL_PASSWD_CRYPTED
setLanguage($a_str)
set user language @access public
setInstitution($a_str)
set institution @access public
setFirstname($a_str)
set firstname @access public
setDepartment($a_str)
set department @access public
setExternalAccount($a_str)
set external account
setLogin($a_str)
set login / username @access public
setTimeLimitFrom($a_from)
getEmail()
get email address @access public
setCountry($a_str)
Set country (free text)
setPasswd($a_str, $a_type=IL_PASSWD_PLAIN)
set password @access public
setPhoneHome($a_str)
set home phone @access public
setFax($a_str)
set fax @access public
setTimeLimitUntil($a_until)
setTimeLimitOwner($a_owner)
setZipcode($a_str)
set zipcode @access public
setLastname($a_str)
set lastame @access public
setStreet($a_str)
set street @access public
setGender($a_str)
set gender @access public
setTimeLimitUnlimited($a_unlimited)
setEmail($a_str)
set email @access public
getFullname($a_max_strlen=0)
get fullname @access public
setMatriculation($a_str)
set matriculation number @access public
setHobby($a_str)
set hobby @access public
setPhoneOffice($a_str)
set office phone @access public
setPhoneMobile($a_str)
set mobile phone @access public
setTitle($a_title)
set object title
setDescription($a_desc)
set object description
static generatePasswords($a_number)
Generate a number of passwords.
Class shibServerData.

References ilUtil\generatePasswords(), shibConfig\getCountry(), shibConfig\getDepartment(), shibConfig\getEmail(), ilObjUser\getEmail(), shibConfig\getFax(), shibConfig\getFirstname(), ilObjUser\getFullname(), shibConfig\getGender(), shibConfig\getHobby(), shibConfig\getInstitution(), shibConfig\getLanguage(), shibConfig\getLastname(), shibConfig\getLogin(), shibConfig\getMatriculation(), shibConfig\getPhoneHome(), shibConfig\getPhoneMobile(), shibConfig\getPhoneOffice(), shibConfig\getStreet(), shibConfig\getTitle(), shibConfig\getZipcode(), IL_PASSWD_CRYPTED, returnNewLoginName(), ilObjUser\setActive(), ilObjUser\setCountry(), ilObjUser\setDepartment(), ilObject\setDescription(), ilObjUser\setEmail(), ilObjUser\setExternalAccount(), ilObjUser\setFax(), ilObjUser\setFirstname(), ilObjUser\setGender(), ilObjUser\setHobby(), ilObjUser\setInstitution(), ilObjUser\setLanguage(), ilObjUser\setLastname(), ilObjUser\setLogin(), ilObjUser\setMatriculation(), ilObjUser\setPasswd(), ilObjUser\setPhoneHome(), ilObjUser\setPhoneMobile(), ilObjUser\setPhoneOffice(), ilObjUser\setStreet(), ilObjUser\setTimeLimitFrom(), ilObjUser\setTimeLimitOwner(), ilObjUser\setTimeLimitUnlimited(), ilObjUser\setTimeLimitUntil(), ilObject\setTitle(), and ilObjUser\setZipcode().

+ Here is the call graph for this function:

◆ isNew()

shibUser::isNew ( )
Returns
boolean

Definition at line 176 of file class.shibUser.php.

177 {
178 return (bool) ($this->getId() == 0);
179 }
getId()
get object id @access public

References ilObject\getId().

+ Here is the call graph for this function:

◆ returnNewLoginName()

shibUser::returnNewLoginName ( )
protected
Returns
string

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

158 {
159 $login = substr(self::cleanName($this->getFirstname()), 0, 1) . '.' . self::cleanName($this->getLastname());
160 //remove whitespaces see mantis 0023123: https://www.ilias.de/mantis/view.php?id=23123
161 $login = preg_replace('/\s+/', '', $login);
162 $appendix = null;
163 $login_tmp = $login;
164 while (self::loginExists($login, $this->getId())) {
165 $login = $login_tmp . $appendix;
166 $appendix++;
167 }
168
169 return $login;
170 }
$login
all user related data in single vars @access public
getLastname()
get lastname @access public
getFirstname()
get firstname @access public
static cleanName($name)

References ilObjUser\$login, cleanName(), ilObjUser\getFirstname(), ilObject\getId(), and ilObjUser\getLastname().

Referenced by createFields().

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

◆ updateFields()

shibUser::updateFields ( )

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

42 {
43 $shibConfig = shibConfig::getInstance();
44 if ($shibConfig->getUpdateFirstname()) {
46 }
47 if ($shibConfig->getUpdateLastname()) {
48 $this->setLastname($this->shibServerData->getLastname());
49 }
50 if ($shibConfig->getUpdateGender()) {
51 $this->setGender($this->shibServerData->getGender());
52 }
53 if ($shibConfig->getUpdateTitle()) {
54 $this->setTitle($this->shibServerData->getTitle());
55 }
56 if ($shibConfig->getUpdateInstitution()) {
58 }
59 if ($shibConfig->getUpdateDepartment()) {
61 }
62 if ($shibConfig->getUpdateStreet()) {
63 $this->setStreet($this->shibServerData->getStreet());
64 }
65 if ($shibConfig->getUpdateZipcode()) {
66 $this->setZipcode($this->shibServerData->getZipcode());
67 }
68 if ($shibConfig->getUpdateCountry()) {
69 $this->setCountry($this->shibServerData->getCountry());
70 }
71 if ($shibConfig->getUpdatePhoneOffice()) {
73 }
74 if ($shibConfig->getUpdatePhoneHome()) {
76 }
77 if ($shibConfig->getUpdatePhoneMobile()) {
79 }
80 if ($shibConfig->getUpdateFax()) {
81 $this->setFax($this->shibServerData->getFax());
82 }
83 if ($shibConfig->getUpdateMatriculation()) {
85 }
86 if ($shibConfig->getUpdateEmail()) {
87 $this->setEmail($this->shibServerData->getEmail());
88 }
89 if ($shibConfig->getUpdateHobby()) {
90 $this->setHobby($this->shibServerData->getHobby());
91 }
92 if ($shibConfig->getUpdateLanguage()) {
93 $this->setLanguage($this->shibServerData->getLanguage());
94 }
95 $this->setDescription($this->getEmail());
96 }

References shibConfig\getCountry(), shibConfig\getDepartment(), shibConfig\getEmail(), ilObjUser\getEmail(), shibConfig\getFax(), shibConfig\getFirstname(), shibConfig\getGender(), shibConfig\getHobby(), shibConfig\getInstance(), shibConfig\getInstitution(), shibConfig\getLanguage(), shibConfig\getLastname(), shibConfig\getMatriculation(), shibConfig\getPhoneHome(), shibConfig\getPhoneMobile(), shibConfig\getPhoneOffice(), shibConfig\getStreet(), shibConfig\getTitle(), shibConfig\getZipcode(), ilObjUser\setCountry(), ilObjUser\setDepartment(), ilObject\setDescription(), ilObjUser\setEmail(), ilObjUser\setFax(), ilObjUser\setFirstname(), ilObjUser\setGender(), ilObjUser\setHobby(), ilObjUser\setInstitution(), ilObjUser\setLanguage(), ilObjUser\setLastname(), ilObjUser\setMatriculation(), ilObjUser\setPhoneHome(), ilObjUser\setPhoneMobile(), ilObjUser\setPhoneOffice(), ilObjUser\setStreet(), ilObject\setTitle(), and ilObjUser\setZipcode().

+ Here is the call graph for this function:

Field Documentation

◆ $shibServerData

shibUser::$shibServerData
protected

Definition at line 16 of file class.shibUser.php.

Referenced by buildInstance().


The documentation for this class was generated from the following file: