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, $passwordHash)
 
 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,
  $passwordHash 
)

Verify a password.

Parameters
$passwordThe plaintext password to verify
$passwordHashThe password hash to match
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.