Stud.IP  jlu_3.3 Revision
User Class Reference
Inheritance diagram for User:
Inheritance graph
Collaboration diagram for User:
Collaboration graph

Public Member Functions

 store ()
 
 triggerChdate ()
 
 getFullName ($format="full")
 
 toArrayRecursive ($only_these_fields=null)
 
 hasRole ($role, $institute_id='')
 
 isFriendOf ($another_user)
 
 isDirty ()
 
 isFieldDirty ($field)
 
 revertValue ($field)
 
 getPristineValue ($field)
 
 toRawArray ($only_these_fields=null)
 
 initRelation ($relation)
 
- Public Member Functions inherited from SimpleORMap
 __construct ($id=null)
 
 __clone ()
 
 getRelationOptions ($relation)
 
 getTableMetadata ()
 
 hasAutoIncrementColumn ()
 
 setId ($id)
 
 getId ()
 
 getNewId ()
 
 toArray ($only_these_fields=null)
 
 toRawArray ($only_these_fields=null)
 
 toArrayRecursive ($only_these_fields=null)
 
 getValue ($field)
 
 getRelationValue ($relation, $field)
 
 setValue ($field, $value)
 
 __get ($field)
 
 __set ($field, $value)
 
 __isset ($field)
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 
 getIterator ()
 
 count ()
 
 isField ($field)
 
 isAdditionalField ($field)
 
 isAliasField ($field)
 
 setData ($data, $reset=false)
 
 haveData ()
 
 isNew ()
 
 isDeleted ()
 
 setNew ($is_new)
 
 getWhereQuery ()
 
 restore ()
 
 store ()
 
 triggerChdate ()
 
 delete ()
 
 isDirty ()
 
 isFieldDirty ($field)
 
 revertValue ($field)
 
 getPristineValue ($field)
 
 initRelation ($relation)
 
 resetRelation ($relation)
 

Static Public Member Functions

static findCurrent ()
 
static findByUsername ($username)
 
static findByDatafield ($datafield_id, $value)
 
static findDozentenByTermin_id ($termin_id)
 
- Static Public Member Functions inherited from SimpleORMap
static expireTableScheme ()
 
static find ($id)
 
static exists ($id)
 
static countBySql ($sql=1, $params=array())
 
static create ($data)
 
static build ($data, $is_new=true)
 
static buildExisting ($data)
 
static import ($data)
 
static findBySQL ($sql, $params=array())
 
static findByObject (SimpleORMap $object)
 
static findOneBySQL ($where, $params=array())
 
static findThru ($foreign_key_value, $options)
 
static findEachBySQL ($callable, $sql, $params=array())
 
static findMany ($pks=array(), $order='', $order_params=array())
 
static findEachMany ($callable, $pks=array(), $order='', $order_params=array())
 
static findAndMapBySQL ($callable, $where, $params=array())
 
static findAndMapMany ($callable, $pks=array(), $order='', $order_params=array())
 
static deleteBySQL ($where, $params=array())
 
static toObject ($id_or_object)
 
static __callStatic ($name, $arguments)
 

Static Protected Member Functions

static configure ($config=array())
 
static configure ($config=array())
 
- Static Protected Member Functions inherited from SimpleORMap
static configure ($config=array())
 
static tableScheme ($db_table)
 

Additional Inherited Members

- Protected Member Functions inherited from SimpleORMap
 _getId ($field)
 
 _setId ($field, $value)
 
 _getAdditionalValueFromRelation ($field)
 
 _setAdditionalValueFromRelation ($field, $value)
 
 _getAdditionalValue ($field)
 
 _setAdditionalValue ($field, $value)
 
 parseRelationOptions ($type, $name, $options)
 
 getTableScheme ()
 
 storeRelations ($only_these=null)
 
 deleteRelations ()
 
 initializeContent ()
 
 applyCallbacks ($type)
 
 registerCallback ($types, $cb)
 
 unregisterCallback ($types, $cb)
 
 cbAutoIncrementColumn ($type)
 
 cbAutoKeyCreation ()
 
 cbNotificationMapper ($cb_type)
 
 setSerializedValue ($field, $value)
 
- Protected Attributes inherited from SimpleORMap
 $content = array()
 
 $content_db = array()
 
 $is_new = true
 
 $is_deleted = false
 
 $db_table = ''
 
 $db_fields = null
 
 $pk = null
 
 $default_values = array()
 
 $serialized_fields = array()
 
 $alias_fields = array()
 
 $additional_fields = array()
 
 $relations = array()
 
 $has_many = array()
 
 $has_one = array()
 
 $belongs_to = array()
 
 $has_and_belongs_to_many = array()
 
 $registered_callbacks
 
 $known_slots = array()
 
 $reserved_slots = array('value','newid','iterator','tablemetadata', 'relationvalue','wherequery','relationoptions','data','new','id')
 
 $notification_map = array()
 
 $additional_data = array()
 
- Static Protected Attributes inherited from SimpleORMap
static $schemes = null
 
static $config = array()
 

Member Function Documentation

◆ configure()

static configure (   $config = array())
staticprotected
Parameters
string$idprimary key of table

Reimplemented from AuthUserMd5.

◆ 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
arrayof User
Here is the call graph for this function:

◆ findByUsername()

static findByUsername (   $username)
static

return user object for given username

Parameters
string$usernamea username
Returns
User
Here is the caller graph for this function:

◆ findCurrent()

static findCurrent ( )
static

Returns the currently authenticated user.

Returns
mixed User
Here is the caller graph for this function:

◆ findDozentenByTermin_id()

static findDozentenByTermin_id (   $termin_id)
static
Here is the call graph for this function:

◆ getFullName()

getFullName (   $format = "full")

returns the name in specified format (formats defined in $GLOBALS['_fullname_sql'])

Parameters
stringone of full,full_rev,no_title,no_title_rev,no_title_short,no_title_motto,full_rev_username
Returns
string guess what - the fullname
Here is the call graph for this function:

◆ getPristineValue()

getPristineValue (   $field)

returns unmodified value of given field

Parameters
string$field
Exceptions
InvalidArgumentException
Returns
mixed

Reimplemented from SimpleORMap.

◆ hasRole()

hasRole (   $role,
  $institute_id = '' 
)

Returns whether the user was assigned a certain role.

Parameters
string$roleThe role to check
string$institute_idAn optional institute_id
Returns
bool True if the user was assigned this role, false otherwise
Here is the call graph for this function:

◆ initRelation()

initRelation (   $relation)
Parameters
string$relation

Reimplemented from SimpleORMap.

Here is the call graph for this function:

◆ isDirty()

isDirty ( )

checks if at least one field was modified since last restore

Returns
boolean

Reimplemented from SimpleORMap.

Here is the caller graph for this function:

◆ isFieldDirty()

isFieldDirty (   $field)

checks if given field was modified since last restore

Parameters
string$field
Returns
boolean

Reimplemented from SimpleORMap.

◆ isFriendOf()

isFriendOf (   $another_user)

Returns whether the given user is stored in contacts.

Parameters
User$another_user
Returns
bool

◆ revertValue()

revertValue (   $field)

reverts value of given field to last restored value

Parameters
string$field
Returns
mixed the restored value

Reimplemented from SimpleORMap.

◆ store()

store ( )
See also
SimpleORMap::store()

Reimplemented from SimpleORMap.

Here is the call graph for this function:

◆ toArrayRecursive()

toArrayRecursive (   $only_these_fields = null)

returns data of table row as assoc array including related records with a 'has*' relationship recurses one level without param

$only_these_fields limits output for relationships in this way: $only_these_fields = array('field_1', 'field_2', 'relation1', 'relation2' => array('rel2_f1', 'rel2_f2', 'rel2_rel11' => array( rel2_rel1_f1) ) ) Here all fields of relation1 will be returned.

Parameters
mixed$only_these_fieldslimit returned fields
Returns
array

Reimplemented from SimpleORMap.

◆ 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
mixed$only_these_fields
Returns
array

Reimplemented from SimpleORMap.

◆ triggerChdate()

triggerChdate ( )
See also
SimpleORMap::triggerChdate()

Reimplemented from SimpleORMap.


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