Class TUser

Description

Implements interfaces:

TUser class

TUser implements basic user functionality for a prado application. To get the name of the user, use Name property. The property IsGuest tells if the user a guest/anonymous user. To obtain or test the roles that the user is in, use property Roles and call isInRole(), respectively.

TUser is meant to be used together with TUserManager and TAuthManager.

Located in /Security/TUserManager.php (line 30)

TComponent
   |
   --TUser
Method Summary
TUser __construct ([TUserManager $manager = null])
boolean getIsGuest ()
string getName ()
array getRoles ()
boolean isInRole (string $role)
IUser loadFromString (string $data)
string saveToString ()
void setIsGuest (boolean $value)
void setName (string $value)
array|string setRoles (mixed $value)
Methods
Constructor __construct (line 53)

Constructor.

  • access: public
TUser __construct ([TUserManager $manager = null])
getIsGuest (line 85)
  • return: if the user is a guest
  • access: public
boolean getIsGuest ()
getManager (line 61)
  • return: user manager
  • access: public
TUserManager getManager ()
getName (line 69)
  • return: username
  • access: public
string getName ()
getRoles (line 106)
  • return: list of roles that the user is of
  • access: public
array getRoles ()
isInRole (line 133)
  • return: whether the user is of this role
  • access: public
boolean isInRole (string $role)
  • string $role: role to be tested. Note, role is case-insensitive.
loadFromString (line 153)
  • return: the user object
  • access: public
IUser loadFromString (string $data)
  • string $data: user data that is serialized and restored from session
saveToString (line 144)
  • return: user data that is serialized and will be stored in session
  • access: public
string saveToString ()
setIsGuest (line 93)
  • access: public
void setIsGuest (boolean $value)
  • boolean $value: if the user is a guest
setName (line 77)
  • access: public
void setName (string $value)
  • string $value: username
setRoles (line 114)
  • return: list of roles that the user is of. If it is a string, roles are assumed by separated by comma
  • access: public
array|string setRoles (mixed $value)

Inherited Methods

Inherited From TComponent

TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()

Documentation generated on Mon, 01 May 2006 23:05:00 -0400 by phpDocumentor 1.3.0RC4