User Interface Reference

Detailed Description

User is the interface for users.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 18 of file User.php.

+ Inheritance diagram for User:

Public Member Functions

 getOID ()
 
 setLogin ($login)
 
 getLogin ()
 
 setPassword ($password)
 
 getPassword ()
 
 verifyPassword ($password)
 
 setIsActive ($isActive)
 
 isActive ()
 
 setIsSuperUser ($isSuperUser)
 
 isSuperUser ()
 
 setConfig ($config)
 
 getConfig ()
 
 hasRole ($roleName)
 
 getRoles ()
 

Member Function Documentation

getOID ( )

Get the object id of the user.

Returns
ObjectId

Implemented in AnonymousUser.

setLogin (   $login)

Set the login of the user.

Parameters
$loginThe login of the user.

Implemented in AnonymousUser, and AbstractUser.

getLogin ( )

Get the login of the user.

Returns
The login of the user.

Implemented in AbstractUser, and AnonymousUser.

setPassword (   $password)

Set the password of the user.

Implementations of User must hash the password before persisting it.

Parameters
$passwordThe plaintext password of the user.

Implemented in AbstractUser, and AnonymousUser.

getPassword ( )

Get the password of the user.

The result is expected to be hashed, if the user was persisted already. If not persisted, the result may be the plaintext password.

Returns
The password of the user,

Implemented in AbstractUser, and AnonymousUser.

verifyPassword (   $password)

Verify the given password against the password of the user.

Parameters
$passwordThe plaintext password to verify
Returns
Boolean.

Implemented in AbstractUser, and AnonymousUser.

setIsActive (   $isActive)

Set if the user is active.

Parameters
$isActiveBoolean whether the user is active or not

Implemented in AbstractUser, and AnonymousUser.

isActive ( )

Check if the user is active.

Returns
Boolean.

Implemented in AbstractUser, and AnonymousUser.

setIsSuperUser (   $isSuperUser)

Set if the user is super user (can't be inactive).

Parameters
$isSuperUserBoolean whether the user is super user or not

Implemented in AbstractUser, and AnonymousUser.

isSuperUser ( )

Check if the user is super user (can't be inactive).

Returns
Boolean

Implemented in AbstractUser, and AnonymousUser.

setConfig (   $config)

Set the configuration file of the user.

Parameters
$configThe configuration file of the user.

Implemented in AbstractUser, and AnonymousUser.

getConfig ( )

Get the configuration file of the user.

Returns
The configuration file of the user.

Implemented in AbstractUser, and AnonymousUser.

hasRole (   $roleName)

Check for a certain role in the user roles.

Parameters
$roleNameThe role name to check for. e.g. "administrators"
Returns
Boolean whether the user has the role

Implemented in AbstractUser, and AnonymousUser.

getRoles ( )

Get the roles of a user.

Returns
Array of role names

Implemented in AbstractUser, and AnonymousUser.