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()

getOID ( )

Get the object id of the user.

Returns
ObjectId

Implemented in AnonymousUser.

◆ setLogin()

setLogin (   $login)

Set the login of the user.

Parameters
$loginThe login of the user.

Implemented in AnonymousUser, and AbstractUser.

◆ getLogin()

getLogin ( )

Get the login of the user.

Returns
The login of the user.

Implemented in AbstractUser, and AnonymousUser.

◆ setPassword()

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()

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()

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()

setIsActive (   $isActive)

Set if the user is active.

Parameters
$isActiveBoolean whether the user is active or not

Implemented in AbstractUser, and AnonymousUser.

◆ isActive()

isActive ( )

Check if the user is active.

Returns
Boolean.

Implemented in AbstractUser, and AnonymousUser.

◆ setIsSuperUser()

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()

isSuperUser ( )

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

Returns
Boolean

Implemented in AbstractUser, and AnonymousUser.

◆ setConfig()

setConfig (   $config)

Set the configuration file of the user.

Parameters
$configThe configuration file of the user.

Implemented in AbstractUser, and AnonymousUser.

◆ getConfig()

getConfig ( )

Get the configuration file of the user.

Returns
The configuration file of the user.

Implemented in AbstractUser, and AnonymousUser.

◆ hasRole()

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()

getRoles ( )

Get the roles of a user.

Returns
Array of role names

Implemented in AbstractUser, and AnonymousUser.