![]() |
![]() |

Public Member Functions | |
| UserManager ($params) | |
| encryptPassword ($password) | |
| onError ($message, $file='', $line='') | |
| startTransaction () | |
| commitTransaction () | |
| rollbackTransaction () | |
| & | createUser ($name, $firstname, $login, $password, $passwordRepeated) |
| removeUser ($login) | |
| setUserProperty ($login, $property, $value) | |
| resetPassword ($login) | |
| changePassword ($login, $oldPassword, $newPassword, $newPasswordRepeated) | |
| & | createRole ($name) |
| removeRole ($name) | |
| setRoleProperty ($name, $property, $value) | |
| addUserToRole ($rolename, $login) | |
| removeUserFromRole ($rolename, $login) | |
| listUsers () | |
| listRoles () | |
| listUserRoles ($login) | |
| listRoleMembers ($rolename) | |
| & | getUser ($login) |
| & | getRole ($name) |
| & | getPrincipal ($oid) |
| removePrincipal ($oid) | |
| getUserClassName () | |
| getRoleClassName () | |
| initialize ($params) | |
| & | createUserImpl ($name, $firstname, $login, $password) |
| removeUserImpl (&$user) | |
| setUserPropertyImpl (&$user, $property, $value) | |
| & | createRoleImpl ($name) |
| removeRoleImpl (&$role) | |
| setRolePropertyImpl (&$role, $property, $value) | |
| addUserToRoleImpl (&$role, &$user) | |
| removeUserFromRoleImpl (&$role, &$user) | |
Data Fields | |
| $_initParams = null | |
| $_userRepository = null | |
| $_roleConfig = null | |
This class defines abstract methods that subclasses must implement to support different user repositories. The UserManager implementation class is defined by the configuration key 'UserManager' in the [implementation] section.
Definition at line 52 of file class.UserManager.php.
| UserManager | ( | $ | params | ) |
Creates a UserManager Object.
| params | Initialization data given in an associative array as needed to load the user repository |
Definition at line 62 of file class.UserManager.php.
References InifileParser::getInstance(), and initialize().

| encryptPassword | ( | $ | password | ) |
Encrypt a password using the md5 algorithm.
| password | The password to encrypt |
Definition at line 78 of file class.UserManager.php.
Referenced by changePassword(), createUser(), LoginController::executeKernel(), and AuthUser::login().
| onError | ( | $ | message, | |
| $ | file = '', |
|||
| $ | line = '' | |||
| ) |
Internal error method. Rollback transaction and call WCMFException::throwEx.
Definition at line 86 of file class.UserManager.php.
References rollbackTransaction(), and WCMFException::throwEx().
Referenced by addUserToRole(), changePassword(), createRole(), createUser(), getPrincipal(), getRoleClassName(), getUserClassName(), listRoleMembers(), listUserRoles(), removePrincipal(), removeRole(), removeUser(), removeUserFromRole(), resetPassword(), setRoleProperty(), and setUserProperty().

| startTransaction | ( | ) |
Start a transaction. If implemented, the UserManager will collect a number of actions and execute them on commitTransaction(). If not implemented the UserManager will execute these actions on every call of the appropriate function.
Reimplemented in UserManagerXML.
Definition at line 97 of file class.UserManager.php.
| commitTransaction | ( | ) |
Commit a transaction. If implemented, the UserManager will execute a number of actions that it collected since the call to startTransaction(). If not implemented the UserManager will execute these actions on every call of the appropriate function.
Reimplemented in UserManagerXML.
Definition at line 104 of file class.UserManager.php.
| rollbackTransaction | ( | ) |
Rollback a transaction. If implemented, the UserManager will rollback a number of actions that it collected since the call to startTransaction(). If not implemented the UserManager will execute these actions on every call of the appropriate function.
Reimplemented in UserManagerXML.
Definition at line 111 of file class.UserManager.php.
Referenced by onError().
| & createUser | ( | $ | name, | |
| $ | firstname, | |||
| $ | login, | |||
| $ | password, | |||
| $ | passwordRepeated | |||
| ) |
Create a user login with a given password.
| name | The name of the user | |
| firstname | The first name of the user | |
| login | The login of the user | |
| password | The password of the user | |
| passwordRepeated | The password of the user again |
Definition at line 122 of file class.UserManager.php.
References createUserImpl(), encryptPassword(), Message::get(), getUser(), and onError().

| removeUser | ( | $ | login | ) |
Remove a user login.
| login | The login of the user |
Definition at line 146 of file class.UserManager.php.
References Message::get(), getUser(), onError(), and removeUserImpl().
Referenced by removePrincipal().

| setUserProperty | ( | $ | login, | |
| $ | property, | |||
| $ | value | |||
| ) |
Set a user property.
| login | The login of the user | |
| property | One of the USER_PROPERTY constants | |
| value | The value to set this property to |
Definition at line 167 of file class.UserManager.php.
References Message::get(), getUser(), onError(), and setUserPropertyImpl().
Referenced by addUserToRole(), and removeUserFromRole().

| resetPassword | ( | $ | login | ) |
Reset a users password to empty.
| login | The login of the user |
Definition at line 191 of file class.UserManager.php.
References Message::get(), getUser(), onError(), and setUserPropertyImpl().

| changePassword | ( | $ | login, | |
| $ | oldPassword, | |||
| $ | newPassword, | |||
| $ | newPasswordRepeated | |||
| ) |
Change a users password.
| login | The login of the user | |
| oldPassword | The old password of the user | |
| newPassword | The new password for the user | |
| newPasswordRepeated | The new password of the user again |
Definition at line 211 of file class.UserManager.php.
References encryptPassword(), Message::get(), getUser(), onError(), and setUserPropertyImpl().

| & createRole | ( | $ | name | ) |
Create a role.
| name | The name of the role |
Definition at line 239 of file class.UserManager.php.
References createRoleImpl(), Message::get(), getRole(), and onError().

| removeRole | ( | $ | name | ) |
Remove a role.
| name | The name of the role |
Definition at line 258 of file class.UserManager.php.
References Message::get(), getRole(), onError(), and removeRoleImpl().
Referenced by removePrincipal().

| setRoleProperty | ( | $ | name, | |
| $ | property, | |||
| $ | value | |||
| ) |
Set a role property.
| name | The name of the role | |
| property | One of the ROLE_PROPERTY constants | |
| value | The value to set this property to |
Definition at line 279 of file class.UserManager.php.
References Message::get(), getRole(), onError(), and setRolePropertyImpl().

| addUserToRole | ( | $ | rolename, | |
| $ | login | |||
| ) |
Add a user to a role.
| rolename | The name of the role | |
| login | The login of the user |
Definition at line 304 of file class.UserManager.php.
References addUserToRoleImpl(), Message::get(), getRole(), getUser(), onError(), and setUserProperty().

| removeUserFromRole | ( | $ | rolename, | |
| $ | login | |||
| ) |
Remove a user from a role.
| rolename | The name of the role | |
| login | The login of the user |
Definition at line 325 of file class.UserManager.php.
References Message::get(), getRole(), getUser(), onError(), removeUserFromRoleImpl(), and setUserProperty().

| listUsers | ( | ) |
Get list of all users.
Definition at line 345 of file class.UserManager.php.
| listRoles | ( | ) |
Get list of all roles.
Definition at line 357 of file class.UserManager.php.
| listUserRoles | ( | $ | login | ) |
Get list of all roles a user has.
Definition at line 369 of file class.UserManager.php.
References Message::get(), getUser(), and onError().
Referenced by listRoleMembers().

| listRoleMembers | ( | $ | rolename | ) |
Get list of all users that have a role.
Definition at line 384 of file class.UserManager.php.
References Message::get(), getRole(), listUserRoles(), and onError().

| & getUser | ( | $ | login | ) |
Get a user from the repository.
| login | The login of the user |
Definition at line 404 of file class.UserManager.php.
Referenced by addUserToRole(), changePassword(), createUser(), listUserRoles(), removeUser(), removeUserFromRole(), resetPassword(), and setUserProperty().
| & getRole | ( | $ | name | ) |
Get a role from the repository.
| name | The name of the role |
Definition at line 420 of file class.UserManager.php.
Referenced by addUserToRole(), createRole(), listRoleMembers(), removeRole(), removeUserFromRole(), and setRoleProperty().
| & getPrincipal | ( | $ | oid | ) |
Get a principal (type: user/role) from the repository.
| oid | The oid of the principal |
Definition at line 436 of file class.UserManager.php.
References PersistenceFacade::decomposeOID(), Message::get(), getRoleClassName(), getUserClassName(), and onError().
Referenced by removePrincipal().

| removePrincipal | ( | $ | oid | ) |
Remove a principal (type: user/role) from the repository.
| oid | The oid of the principal |
Definition at line 460 of file class.UserManager.php.
References PersistenceFacade::decomposeOID(), Message::get(), getPrincipal(), getRoleClassName(), getUserClassName(), onError(), removeRole(), and removeUser().

| getUserClassName | ( | ) |
Get the user implemenataion class name as configured in config section 'implementation' key 'User'. Maybe used in a static way.
Definition at line 483 of file class.UserManager.php.
References InifileParser::getInstance(), and onError().
Referenced by UserManagerXML::createUserImpl(), UserManagerRDB::createUserImpl(), UserManagerXML::createUserInstance(), UserController::executeKernel(), PrincipalController::executeKernel(), LockManagerRDB::getLockImpl(), getPrincipal(), User::getUser(), UserManagerRDB::initialize(), AuthUser::login(), and removePrincipal().

| getRoleClassName | ( | ) |
Get the role implemenataion class name as configured in config section 'implementation' key 'Role'. Maybe used in a static way.
Definition at line 496 of file class.UserManager.php.
References InifileParser::getInstance(), and onError().
Referenced by UserManagerRDB::createRoleImpl(), UserManagerXML::createRoleInstance(), PrincipalController::executeKernel(), getPrincipal(), User::getRoleByName(), User::getRoles(), UserManagerRDB::initialize(), and removePrincipal().

| initialize | ( | $ | params | ) |
Methods to be implemented by subclasses. Get the user and roles. This method is called before any operation on the repository. Subclasses will override this method to get the data from the application repository.
| params | Initialization data given in an associative array as needed to load the user repository |
Reimplemented in UserManagerRDB, UserManagerRDB, and UserManagerXML.
Definition at line 514 of file class.UserManager.php.
References WCMFException::throwEx().
Referenced by UserManager().

| & createUserImpl | ( | $ | name, | |
| $ | firstname, | |||
| $ | login, | |||
| $ | password | |||
| ) |
Create a user login with a given password.
| name | The name of the user | |
| firstname | The first name of the user | |
| login | The login of the user | |
| password | The encrypted password of the user |
Reimplemented in UserManagerRDB, UserManagerRDB, and UserManagerXML.
Definition at line 528 of file class.UserManager.php.
References WCMFException::throwEx().
Referenced by createUser().

| removeUserImpl | ( | &$ | user | ) |
Remove a user.
| user | A reference to the user |
Precondition: The login does exist
Reimplemented in UserManagerRDB, and UserManagerXML.
Definition at line 539 of file class.UserManager.php.
References WCMFException::throwEx().
Referenced by removeUser().

| setUserPropertyImpl | ( | &$ | user, | |
| $ | property, | |||
| $ | value | |||
| ) |
Set a user property.
| user | A reference to the user | |
| property | One of the USER_PROPERTY constants or 'password' | |
| value | The value to set this property to |
Reimplemented in UserManagerRDB, and UserManagerXML.
Definition at line 550 of file class.UserManager.php.
References WCMFException::throwEx().
Referenced by changePassword(), resetPassword(), and setUserProperty().

| & createRoleImpl | ( | $ | name | ) |
Create a role.
| name | The name of the role |
Reimplemented in UserManagerRDB, UserManagerRDB, and UserManagerXML.
Definition at line 561 of file class.UserManager.php.
References WCMFException::throwEx().
Referenced by createRole().

| removeRoleImpl | ( | &$ | role | ) |
Remove a role.
| role | A reference to the role |
Precondition: The role does exist
Reimplemented in UserManagerRDB, and UserManagerXML.
Definition at line 572 of file class.UserManager.php.
References WCMFException::throwEx().
Referenced by removeRole().

| setRolePropertyImpl | ( | &$ | role, | |
| $ | property, | |||
| $ | value | |||
| ) |
Set a role property.
| role | A reference to the role | |
| property | One of the ROLE_PROPERTY constants | |
| value | The value to set this property to |
Reimplemented in UserManagerRDB, and UserManagerXML.
Definition at line 583 of file class.UserManager.php.
References WCMFException::throwEx().
Referenced by setRoleProperty().

| addUserToRoleImpl | ( | &$ | role, | |
| &$ | user | |||
| ) |
Add a user to a role.
| role | A reference to the role | |
| user | A reference to the user |
Reimplemented in UserManagerRDB, and UserManagerXML.
Definition at line 594 of file class.UserManager.php.
References WCMFException::throwEx().
Referenced by addUserToRole().

| removeUserFromRoleImpl | ( | &$ | role, | |
| &$ | user | |||
| ) |
Remove a user from a role.
| role | A reference to the role | |
| user | A reference to the user |
Reimplemented in UserManagerRDB, and UserManagerXML.
Definition at line 605 of file class.UserManager.php.
References WCMFException::throwEx().
Referenced by removeUserFromRole().

| $_initParams = null |
| $_userRepository = null |
Definition at line 55 of file class.UserManager.php.
| $_roleConfig = null |
Definition at line 56 of file class.UserManager.php.
|
This page generated via doxygen 1.5.8 Mon Mar 30 01:58:46 2009. Copyright © 2009 wemove digital solutions GmbH. |
|