Stud.IP  2.2 Revision 48548
 All Data Structures Namespaces Files Functions Variables Pages
User Class Reference
Inheritance diagram for User:
Inheritance graph
Collaboration diagram for User:
Collaboration graph

Public Member Functions

 __construct ($id=null)
 setId ($id)
 getNewId ()
 getWhereQuery ()
 setData ($data, $reset=false)
 restore ()
 store ()
 triggerChdate ()
 delete ()
 getFullName ($format="full")
 get_id ($id="")
 put_id ()
 start ($sid="")
- Public Member Functions inherited from Session
 register ($things)
 is_registered ($name)
 unregister ($things)
 url ($url)
 purl ($url)
 self_url ()
 pself_url ()
 hidden_session ()
 add_query ($qarray)
 padd_query ($qarray)
 serialize ($prefix, $str)
 get_lock ()
 release_lock ()
 freeze ()
 thaw ()
 reimport_get_vars ()
 reimport_post_vars ()
 reimport_cookie_vars ()
 reimport_any_vars ($arrayname)
 set_container ()
 set_tokenname ()
 release_token ()
 put_headers ()
 gc ()
 Session ()
 start ()
 name ($name= '')
 register ($var_names)
 is_registered ($var_name)
 unregister ($var_names)
 set_tokenname ()
 put_headers ()
 open ()
 close ()
 del ()
 freeze ($id=NULL, $sess_data=NULL)
 thaw ()
 gc ()
 set_container ()
 url ($url)
 self_url ()
 pself_url ()
 regenerate_session_id ($keep_session_vars=array())
- Public Member Functions inherited from SimpleORMap
 getTableMetadata ()
 getId ()
 getData ()
 toArray ()
 getValue ($field)
 setValue ($field, $value)
 __get ($field)
 __set ($field, $value)
 __isset ($field)
 offsetExists ($offset)
 offsetGet ($offset)
 offsetSet ($offset, $value)
 offsetUnset ($offset)
 getIterator ()
 count ()
 isField ($field)
 haveData ()
 isNew ()
 setNew ($is_new)
 isDirty ()
 isFieldDirty ($field)
 revertValue ($field)

Static Public Member Functions

static find ($id)
static findByUsername ($username)
static findBySql ($where)
static toObject ($id_or_object)
- Static Public Member Functions inherited from SimpleORMap
static expireTableScheme ()
static find ($class, $id)
static findBySQL ($class, $where)
static deleteBySQL ($class, $where)
static toObject ($class, $id_or_object)

Data Fields

 $classname = "User"
 $that_class = "Session_sql"
 $name
 $id
 $pt = array()
 $that
- Data Fields inherited from Session
 $classname = "Session"
 $magic = ""
 $mode = "cookie"
 $fallback_mode
 $lifetime = 0
 $cookie_domain = ""
 $cookie_path = "/"
 $gc_time = 1440
 $gc_probability = 1
 $auto_init = ""
 $secure_auto_init = 1
 $allowcache = "no"
 $allowcache_expire = 1440
 $that_class = ""
 $name = ""
 $id = ""
 $that
 $pt = array()
 $in = false
 $cookiename
 $trans_id_enabled = true
 $module = 'user'
 $save_path

Protected Member Functions

 getTableScheme ()
- Protected Member Functions inherited from SimpleORMap
 initializeContent ()

Protected Attributes

 $auth_user_md5
 $user_info
- Protected Attributes inherited from SimpleORMap
 $content = array()
 $content_db = array()
 $is_new = true
 $db_table = ''
 $db_fields = null
 $pk = null
 $default_values = array()

Additional Inherited Members

- Static Protected Member Functions inherited from SimpleORMap
static TableScheme ($db_table)
- Static Protected Attributes inherited from SimpleORMap
static $schemes

Detailed Description

this class represents one user, the attributes from tables auth_user_md5 and user_info were merged.

$a_user = User::find($id);
$another_users_email = User::findByUsername($username)->email;
$a_user->email = $another_users_email;
$a_user->store();

Constructor & Destructor Documentation

__construct (   $id = null)
Parameters
string$ida user id

Reimplemented from SimpleORMap.

Member Function Documentation

delete ( )
See Also
SimpleORMap::delete()

Reimplemented from SimpleORMap.

static find (   $id)
static

returns new User instance for given user id when found in db, else null

Parameters
stringa user id
Returns
mixed a User object or null

Here is the caller graph for this function:

static findBySql (   $where)
static

returns array of instances of given class filtered by given sql should be overridden in subclass to omit $class param

Parameters
string$class
stringsql clause to use on the right side of WHERE
Returns
array

Here is the call graph for this function:

Here is the caller graph for this function:

static findByUsername (   $username)
static

returns new User instance for given username when found in db, else null

Parameters
stringa username
Returns
mixed a User object or null

Here is the call graph for this function:

get_id (   $id = "")

Reimplemented from Session.

Here is the caller graph for this function:

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:

getNewId ( )
See Also
SimpleORMap::getNewId()

Reimplemented from SimpleORMap.

getTableScheme ( )
protected

Reimplemented from SimpleORMap.

getWhereQuery ( )
See Also
SimpleORMap::getWhereQuery()

Reimplemented from SimpleORMap.

Here is the caller graph for this function:

put_id ( )

Reimplemented from Session.

restore ( )
See Also
SimpleORMap::restore()

Reimplemented from SimpleORMap.

Here is the call graph for this function:

Here is the caller graph for this function:

setData (   $data,
  $reset = false 
)
See Also
SimpleORMap::setData()

Reimplemented from SimpleORMap.

Here is the caller graph for this function:

setId (   $id)
See Also
SimpleORMap::setId()

Reimplemented from SimpleORMap.

start (   $sid = "")

Reimplemented from Session.

Here is the call graph for this function:

store ( )
See Also
SimpleORMap::store()

Reimplemented from SimpleORMap.

Here is the call graph for this function:

static toObject (   $id_or_object)
static

returns user object for given id or null the param could be a string, an assoc array containing primary key field or an already matching object. In all these cases an object is returned

Parameters
mixed$id_or_objectid as string, object or assoc array
Returns
User
triggerChdate ( )
See Also
SimpleORMap::triggerChdate()

Reimplemented from SimpleORMap.

Here is the caller graph for this function:

Field Documentation

$auth_user_md5
protected
$classname = "User"
$id
$name
$pt = array()
$that
$that_class = "Session_sql"
$user_info
protected

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