|
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 | search ($attributes) |
|
static | convert ($old_id, $new_id, $identity=false) |
|
static | exportUserData (StoredUserData $storage) |
|
static | getCalendarOwner (string $owner_id) |
|
static | tableScheme ($db_table) |
|
static | expireTableScheme () |
|
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 (string $name, array $arguments) |
|
◆ __toString()
◆ build()
static build |
( |
|
$data, |
|
|
|
$is_new = true |
|
) |
| |
|
static |
build new object with given data
- Parameters
-
$data | array assoc array of record |
- Returns
- User
◆ cbClearCaches()
◆ cbRemoveFeedback()
This callback is called after deleting a User. It removes feedback entries that are associated with the User.
◆ cbRemoveForumVisits()
This callback is called after deleting a User. It removes forum visit entries that are associated with the User.
◆ cbStudipLog()
- Parameters
-
$type | string type of callback |
◆ 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
◆ describeRange()
Returns a descriptive text for the range type.
- Returns
- string
Implements Range.
◆ exportUserData()
Export available data of a given user into a storage object (an instance of the StoredUserData class) for that user.
- Parameters
-
Implements PrivacyObject.
◆ 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
◆ 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
◆ getCalendarOwner()
static getCalendarOwner |
( |
string |
$owner_id | ) |
|
|
static |
◆ getConfiguration()
{Returns the configuration object for this range.
- Returns
- RangeConfig
}
Implements Range.
◆ getFullName()
getFullName |
( |
|
$format = 'default' | ) |
|
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
Implements Range.
◆ getGender()
Delivers the gender as text
- Returns
- string
◆ 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)
Implements Range.
◆ getRangeType()
Returns a unique identificator for the range type.
- Returns
- string
Implements Range.
◆ getRoles()
getRoles |
( |
|
$with_implicit = false | ) |
|
Returns the roles that were assigned to the user.
- Parameters
-
- Returns
- array
◆ getSalutation()
Delivers the gender as text
- Returns
- string
◆ getStudipKingIcon()
Get the decorated StudIP-Kings information
- Returns
- String
◆ hasPermissionLevel()
hasPermissionLevel |
( |
string |
$permission, |
|
|
?Range |
$for_range = null |
|
) |
| |
◆ 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 | ) |
|
◆ isAccessibleToUser()
isAccessibleToUser |
( |
|
$user_id = null | ) |
|
Decides whether the user may access the range.
- Parameters
-
string | null | $user_id | Optional id of a user, defaults to current user |
- Returns
- bool
Implements Range.
◆ isBlocked()
Returns whether a user is blocked either explicitely due to the "locked" property or by a set expiration date.
- Returns
- bool
- Since
- Stud.IP 5.4
◆ isCalendarReadable()
isCalendarReadable |
( |
?string |
$user_id = null | ) |
|
◆ isCalendarWritable()
isCalendarWritable |
( |
string |
$user_id = null | ) |
|
◆ isDirty()
checks if at least one field was modified since last restore
- Returns
- boolean
◆ isEditableByUser()
isEditableByUser |
( |
|
$user_id = null | ) |
|
Decides whether the user may edit/alter the range.
- Parameters
-
string | null | $user_id | Optional id of a user, defaults to current user |
- Returns
- bool
Implements Range.
◆ isExpired()
Returns whether a user account is expired.
- Returns
- bool
- Since
- Stud.IP 5.4
◆ 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 |
Temporary migrate to User.php
- Parameters
-
- Returns
- array
◆ 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()
The documentation for this class was generated from the following file: