Class MOXMAN_Auth_User
Inheritance | MOXMAN_Auth_User |
---|
This class reprecents the currently logged in user.
Public Methods
Method | Description | Defined 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
Constructs a new user instance.
public void __construct ( ) |
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. |
---|
Returns the name of the user.
public String getName ( ) | ||
return | String | Name of the user. |
---|
Returns the password for the user used when a login action occurs.
public String getPassword ( ) | ||
return | String | Password for the user. |
---|
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. |
---|
Returns true/dalse if the user is persistent or not.
public boolean isPersistent ( ) | ||
return | boolean | True/false if the user is persitent or not. |
---|
Adds the user to the specified group by name.
public \User joinGroup ( $group ) | ||
$group | string | Group to join. |
return | \User | Instance for chainability. |
---|
Removes the user from specified group by name.
public \User leaveGroup ( $group ) | ||
$group | string | Group to leave. |
return | \User | Instance for chainability. |
---|
Sets the name of the user.
public void setName ( $name ) | ||
$name | string | Name of the user. |
Sets the password for the user.
public void setPassword ( $password ) | ||
$password | string | Password for the user. |
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. |