Class MOXMAN_Auth_User

InheritanceMOXMAN_Auth_User

This class reprecents the currently logged in user.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Constructs a new user instance. MOXMAN_Auth_User
getGroups() Returns an array of the groups the users is a member of. MOXMAN_Auth_User
getName() Returns the name of the user. MOXMAN_Auth_User
getPassword() Returns the password for the user used when a login action occurs. MOXMAN_Auth_User
isMemberOf() Return true/false if the specified name is a group that the user is a member of. MOXMAN_Auth_User
isPersistent() Returns true/dalse if the user is persistent or not. MOXMAN_Auth_User
joinGroup() Adds the user to the specified group by name. MOXMAN_Auth_User
leaveGroup() Removes the user from specified group by name. MOXMAN_Auth_User
setName() Sets the name of the user. MOXMAN_Auth_User
setPassword() Sets the password for the user. MOXMAN_Auth_User
setPersistent() Sets true/false is the user is to be persistent on the client side using auth cookies. MOXMAN_Auth_User

Method Details

__construct() public method

Constructs a new user instance.

public void __construct ( )
getGroups() public method

Returns an array of the groups the users is a member of.

public Array getGroups ( )
return Array

Array of the groups the users is a member of.

getName() public method

Returns the name of the user.

public String getName ( )
return String

Name of the user.

getPassword() public method

Returns the password for the user used when a login action occurs.

public String getPassword ( )
return String

Password for the user.

isMemberOf() public method

Return true/false if the specified name is a group that the user is a member of.

public Boolean isMemberOf ( $name )
$name string

Name of the group to check membership on.

return Boolean

True/false if the user if a member of the specified group or not.

isPersistent() public method

Returns true/dalse if the user is persistent or not.

public boolean isPersistent ( )
return boolean

True/false if the user is persitent or not.

joinGroup() public method

Adds the user to the specified group by name.

public \User joinGroup ( $group )
$group string

Group to join.

return \User

Instance for chainability.

leaveGroup() public method

Removes the user from specified group by name.

public \User leaveGroup ( $group )
$group string

Group to leave.

return \User

Instance for chainability.

setName() public method

Sets the name of the user.

public void setName ( $name )
$name string

Name of the user.

setPassword() public method

Sets the password for the user.

public void setPassword ( $password )
$password string

Password for the user.

setPersistent() public method

Sets true/false is the user is to be persistent on the client side using auth cookies.

public void setPersistent ( $persistent )
$persistent boolean

Persistent state.