|
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 | tableScheme ($db_table) |
|
static | expireTableScheme () |
|
static | exists ($id) |
|
static | countBySql ($sql= '1', $params=[]) |
|
static | create ($data) |
|
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) |
|
static build |
( |
|
$data, |
|
|
|
$is_new = true |
|
) |
| |
|
static |
build new object with given data
- Parameters
-
$data | array assoc array of record |
- Returns
- User
This callback is called after deleting a User. It removes feedback entries that are associated with the User.
- Parameters
-
$type | string type of callback |
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
static configure |
( |
|
$config = [] | ) |
|
|
staticprotected |
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
Returns a descriptive text for the range type.
- Returns
- string
Implements Range.
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 |
static findByUsername |
( |
|
$username | ) |
|
|
static |
return user object for given username
- Parameters
-
string | $username | a username |
- Returns
- User
Returns the currently authenticated user.
- Returns
- ?User User
Returns user object including user_info
- Parameters
-
- Returns
- ?User User
static findFullMany |
( |
|
$ids, |
|
|
|
$order_by = '' |
|
) |
| |
|
static |
Returns user objects including user_info
- Parameters
-
array | $ids | |
string | $order_by | |
- Returns
- User[] User
{Returns the configuration object for this range.
- Returns
- RangeConfig
}
Implements Range.
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
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.
This function returns the perms allowed for an institute for the current user
- Returns
- array list of perms
getPristineValue |
( |
|
$field | ) |
|
returns unmodified value of given field
- Parameters
-
- Exceptions
-
- Returns
- mixed
Returns the id of the current range
- Returns
- mixed (string|int)
Implements Range.
Returns a unique identificator for the range type.
- Returns
- string
Implements Range.
getRoles |
( |
|
$with_implicit = false | ) |
|
Returns the roles that were assigned to the user.
- Parameters
-
- Returns
- array
Get the decorated StudIP-Kings information
- Returns
- String
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 |
( |
|
$relation | ) |
|
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.
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
checks if at least one field was modified since last restore
- Returns
- boolean
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.
Returns whether a user account is expired.
- Returns
- bool
- Since
- Stud.IP 5.4
checks if given field was modified since last restore
- Parameters
-
- Returns
- boolean
isFriendOf |
( |
|
$another_user | ) |
|
Returns whether the given user is stored in contacts.
- Parameters
-
- Returns
- bool
reverts value of given field to last restored value
- Parameters
-
- Returns
- mixed the restored value
static search |
( |
|
$attributes | ) |
|
|
static |
toArrayRecursive |
( |
|
$only_these_fields = null | ) |
|
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
The documentation for this class was generated from the following file: