
Public Member Functions | |
| init () | |
| __toString () | |
| preDelete () | |
| setPassword ($password) | |
| checkPassword ($password) | |
| checkCreditentials ($login, $password) | |
| preSave ($create=false) | |
| isAnonymous () | |
| getAllPermissions ($force=false) | |
| hasPerm ($perm, $obj=null) | |
| hasAppPerms ($app) | |
| setMessage ($message) | |
| getAndDeleteMessages () | |
| getProfile () | |
Public Attributes | |
| $_model = 'Pluf_User' | |
| $session_key = '_PX_Pluf_User_auth' | |
| $_cache_perms = null | |
| Pluf_User::init | ( | ) |
Reimplemented from Pluf_Model.
| Pluf_User::__toString | ( | ) |
String representation of the user.
Reimplemented from Pluf_Model.
| Pluf_User::preDelete | ( | ) |
Predelete to drop the row level permissions.
[signal]
[sender]
[description]
This signal allows an application to perform special operations at the deletion of a user.
[parameters]
array('user' => $user)
Reimplemented from Pluf_Model.
| Pluf_User::setPassword | ( | $ | password | ) |
Set the password of a user.
You need to manually save the user to store the password in the database. The supported algorithms are md5, crc32 and sha1, sha1 being the default.
| string | New password |
| Pluf_User::checkPassword | ( | $ | password | ) |
Check if the password of a user matches with the one in the database.
| string | Password |
| Pluf_User::checkCreditentials | ( | $ | login, | |
| $ | password | |||
| ) |
Check if the login creditentials are valid.
| string | Login | |
| string | Password |
| Pluf_User::preSave | ( | $ | create = false |
) |
Set the last_login and date_joined before creating.
Reimplemented from Pluf_Model.
| Pluf_User::isAnonymous | ( | ) |
Check if a user is anonymous.
| Pluf_User::getAllPermissions | ( | $ | force = false |
) |
Get all the permissions of a user.
| bool | Force the reload of the list of permissions (false) |
| Pluf_User::hasPerm | ( | $ | perm, | |
| $ | obj = null | |||
| ) |
Check if a user as a permission.
| string | Permission | |
| Object | Object for row level permission (null) |
| Pluf_User::hasAppPerms | ( | $ | app | ) |
Check if a user one or more application permission.
| Pluf_User::setMessage | ( | $ | message | ) |
Set a message.
The user must not be anonymous.
| string | Message |
| Pluf_User::getAndDeleteMessages | ( | ) |
Get messages and delete them.
The user must not be anonymous.
| Pluf_User::getProfile | ( | ) |
Get profile.
Retrieve the profile of the current user. If not profile in the database a Pluf_Exception_DoesNotExist exception is thrown, just catch it and create a profile.
| Pluf_User::$_model = 'Pluf_User' |
Reimplemented from Pluf_Model.
| Pluf_User::$session_key = '_PX_Pluf_User_auth' |
If the session contains this key with a numeric id in. The corresponding user is loaded.
| Pluf_User::$_cache_perms = null |
Cache of the permissions.