|
static | findCurrent () |
|
static | build ($data, $is_new=true) |
|
static | findFull ($id) |
|
static | findFullMany ($ids, $order_by='') |
|
static | findByUsername ($username) |
|
static | findByDatafield ($datafield_id, $value) |
|
static | findDozentenByTermin_id ($termin_id) |
|
static | search ($attributes) |
|
static | convert ($old_id, $new_id, $identity=false) |
|
static | exportUserData (StoredUserData $storage) |
|
static | tableScheme ($db_table) |
|
static | expireTableScheme () |
|
static | find ($id) |
|
static | exists ($id) |
|
static | countBySql ($sql=1, $params=[]) |
|
static | create ($data) |
|
static | build ($data, $is_new=true) |
|
static | buildExisting ($data) |
|
static | import ($data) |
|
static | findBySQL ($sql, $params=[]) |
|
static | findOneBySQL ($where, $params=[]) |
|
static | findThru ($foreign_key_value, $options) |
|
static | findEachBySQL ($callable, $sql, $params=[]) |
|
static | findMany ($pks=[], $order='', $order_params=[]) |
|
static | findEachMany ($callable, $pks=[], $order='', $order_params=[]) |
|
static | findAndMapBySQL ($callable, $where, $params=[]) |
|
static | findAndMapMany ($callable, $pks=[], $order='', $order_params=[]) |
|
static | deleteBySQL ($where, $params=[]) |
|
static | toObject ($id_or_object) |
|
static | __callStatic ($name, $arguments) |
|
|
const | ID_SEPARATOR = '_' |
|
static | $schemes = null |
|
| _getId ($field) |
|
| _setId ($field, $value) |
|
| _getAdditionalValueFromRelation ($field) |
|
| _setAdditionalValueFromRelation ($field, $value) |
|
| _getAdditionalValue ($field) |
|
| _setAdditionalValue ($field, $value) |
|
| parseRelationOptions ($type, $name, $options) |
|
| storeRelations ($only_these=null) |
|
| deleteRelations () |
|
| initializeContent () |
|
| applyCallbacks ($type) |
|
| registerCallback ($types, $cb) |
|
| unregisterCallback ($types, $cb) |
|
| cbAutoIncrementColumn ($type) |
|
| cbAutoKeyCreation () |
|
| cbNotificationMapper ($cb_type) |
|
| cbAfterInitialize ($cb_type) |
|
| setSerializedValue ($field, $value) |
|
| setI18nValue ($field, $value) |
|
| cbI18N ($type) |
|
| $content = [] |
|
| $content_db = [] |
|
| $is_new = true |
|
| $is_deleted = false |
|
| $db_table = '' |
|
| $db_fields = null |
|
| $pk = null |
|
| $default_values = [] |
|
| $serialized_fields = [] |
|
| $alias_fields = [] |
|
| $i18n_fields = [] |
|
| $additional_fields = [] |
|
| $relations = [] |
|
| $has_many = [] |
|
| $has_one = [] |
|
| $belongs_to = [] |
|
| $has_and_belongs_to_many = [] |
|
| $registered_callbacks = [] |
|
| $known_slots = [] |
|
| $notification_map = [] |
|
| $additional_data = [] |
|
| $getter_setter_map = [] |
|
static | $config = [] |
|
static | $reserved_slots = ['value','newid','iterator','tablemetadata', 'relationvalue','wherequery','relationoptions','data','new','id'] |
|
◆ build()
static build |
( |
|
$data, |
|
|
|
$is_new = true |
|
) |
| |
|
static |
build new object with given data
- Parameters
-
$data | array assoc array of record |
- Returns
- User
◆ changeEmail()
changeEmail |
( |
|
$email, |
|
|
|
$force = false |
|
) |
| |
Changes a user's email adress.
- Parameters
-
string | $email | New email |
bool | $force | Force update (even if nothing actually changed) |
- Returns
- bool
◆ configure()
static configure |
( |
|
$config = [] | ) |
|
|
staticprotected |
◆ convert()
static convert |
( |
|
$old_id, |
|
|
|
$new_id, |
|
|
|
$identity = false |
|
) |
| |
|
static |
Merge an user ($old_id) to another user ($new_id). This is a part of the old numit-plugin.
- Parameters
-
string | $old_user | |
string | $new_user | |
boolean | $identity | merge identity (if true) |
- Returns
- array() messages to display after migration
- Deprecated:
◆ describeRange()
Returns a descriptive text for the range type.
- Returns
- string
◆ exportUserData()
static exportUserData |
( |
StoredUserData |
$storage | ) |
|
|
static |
Export available data of a given user into a storage object (an instance of the StoredUserData class) for that user.
- Parameters
-
StoredUserData | $storage | object to store data into |
◆ findByDatafield()
static findByDatafield |
( |
|
$datafield_id, |
|
|
|
$value |
|
) |
| |
|
static |
returns an array of User-objects that have the given value in the given datafield.
- Parameters
-
string | $datafield_id | |
| array | of User |
◆ findByUsername()
static findByUsername |
( |
|
$username | ) |
|
|
static |
return user object for given username
- Parameters
-
string | $username | a username |
- Returns
- User
◆ findCurrent()
Returns the currently authenticated user.
- Returns
- User User
◆ findDozentenByTermin_id()
static findDozentenByTermin_id |
( |
|
$termin_id | ) |
|
|
static |
◆ findFull()
Returns user object including user_info
- Parameters
-
- Returns
- User User
◆ findFullMany()
static findFullMany |
( |
|
$ids, |
|
|
|
$order_by = '' |
|
) |
| |
|
static |
Returns user objects including user_info
- Parameters
-
array | $ids | |
string | $order_by | |
- Returns
- User[] User
◆ getFullName()
getFullName |
( |
|
$format = 'full' | ) |
|
returns the name in specified format (formats defined in $GLOBALS['_fullname_sql'])
- Parameters
-
string | one of full,full_rev,no_title,no_title_rev,no_title_short,no_title_motto,full_rev_username |
- Returns
- string guess what - the fullname
◆ getHomepageElements()
Builds an array containing all available elements that are part of a user's homepage together with their visibility. It isn't sufficient to just load the visibility settings from database, because if the user has added some data (e.g. CV) but not yet assigned a special visibility to that field, it wouldn't show up.
- Returns
- array An array containing all available homepage elements together with their visibility settings in the form $name => $visibility.
◆ getInstitutePerms()
This function returns the perms allowed for an institute for the current user
- Returns
- array list of perms
◆ getPristineValue()
getPristineValue |
( |
|
$field | ) |
|
returns unmodified value of given field
- Parameters
-
- Exceptions
-
- Returns
- mixed
◆ getRangeId()
Returns the id of the current range
- Returns
- mixed (string|int)
◆ getRangeType()
Returns a unique identificator for the range type.
- Returns
- string
◆ getRoles()
getRoles |
( |
|
$with_implicit = false | ) |
|
Returns the roles that were assigned to the user.
- Parameters
-
- Returns
- array
◆ getStudipKingIcon()
Get the decorated StudIP-Kings information
- Returns
- String
◆ hasRole()
hasRole |
( |
|
$role, |
|
|
|
$institute_id = '' |
|
) |
| |
Returns whether the user was assigned a certain role.
- Parameters
-
string | $role | The role to check |
string | $institute_id | An optional institute_id |
- Returns
- bool True if the user was assigned this role, false otherwise
◆ initRelation()
initRelation |
( |
|
$relation | ) |
|
◆ isDirty()
checks if at least one field was modified since last restore
- Returns
- boolean
◆ isFieldDirty()
checks if given field was modified since last restore
- Parameters
-
- Returns
- boolean
◆ isFriendOf()
isFriendOf |
( |
|
$another_user | ) |
|
Returns whether the given user is stored in contacts.
- Parameters
-
- Returns
- bool
◆ revertValue()
reverts value of given field to last restored value
- Parameters
-
- Returns
- mixed the restored value
◆ search()
static search |
( |
|
$attributes | ) |
|
|
static |
◆ store()
◆ toArrayRecursive()
toArrayRecursive |
( |
|
$only_these_fields = null | ) |
|
◆ toRawArray()
toRawArray |
( |
|
$only_these_fields = null | ) |
|
Returns data of table row as assoc array with raw contents like they are in the database. Pass array of fieldnames or ws separated string to limit fields.
- Parameters
-
- Returns
- array
◆ triggerChdate()
◆ userMayAccessRange()
userMayAccessRange |
( |
|
$user_id = null | ) |
|
Decides whether the user may access the range.
- Parameters
-
string | $user_id | Optional id of a user, defaults to current user |
- Returns
- bool
◆ userMayAdministerRange()
userMayAdministerRange |
( |
|
$user_id = null | ) |
|
Decides whether the user may administer the range.
- Parameters
-
string | $user_id | Optional id of a user, defaults to current user |
- Returns
- bool
◆ userMayEditRange()
userMayEditRange |
( |
|
$user_id = null | ) |
|
Decides whether the user may edit/alter the range.
- Parameters
-
string | $user_id | Optional id of a user, defaults to current user |
- Returns
- bool
The documentation for this class was generated from the following file: