UserController Class Reference
Detailed Description
UserController is used to change the current user's password.
The controller supports the following actions:
Action default
Handle actions regarding the current user
For details about the parameters, see documentation of the methods.
| Response Actions | |
|---|---|
ok | In all cases |
Definition at line 49 of file UserController.php.
Inheritance diagram for UserController:Public Member Functions | |
| __construct (Session $session, PersistenceFacade $persistenceFacade, PermissionManager $permissionManager, ActionMapper $actionMapper, Localization $localization, Message $message, Configuration $configuration, PrincipalFactory $principalFactory, EventManager $eventManager) | |
| changePassword () | |
| setConfigValue () | |
| getConfigValue () | |
| afterCommit (TransactionEvent $event) | |
Public Member Functions inherited from Controller | |
| __construct (Session $session, PersistenceFacade $persistenceFacade, PermissionManager $permissionManager, ActionMapper $actionMapper, Localization $localization, Message $message, Configuration $configuration) | |
| initialize (Request $request, Response $response) | |
| execute ($method=null) | |
| getRequest () | |
| getResponse () | |
Protected Member Functions | |
| changePasswordImpl (User $user, $oldPassword, $newPassword, $newPasswordRepeated) | |
Protected Member Functions inherited from Controller | |
| validate () | |
| doExecute ($method=null) | |
| executeSubAction ($action) | |
| redirect ($location, $key=null, $data=null) | |
| getLogger () | |
| getSession () | |
| getPersistenceFacade () | |
| getPermissionManager () | |
| getActionMapper () | |
| getLocalization () | |
| getMessage () | |
| getConfiguration () | |
| requireTransaction () | |
| endTransaction ($commit) | |
| isLocalizedRequest () | |
| checkLanguageParameter () | |
| generateCsrfToken ($name, $refresh=true) | |
| validateCsrfToken ($name, $invalidate=true) | |
| getLocalSessionValue ($key, $default=null) | |
| setLocalSessionValue ($key, $value) | |
| clearLocalSessionValues () | |
Additional Inherited Members | |
Public Attributes inherited from Controller | |
| const | CSRF_TOKEN_PARAM = 'csrf_token' |
Constructor & Destructor Documentation
◆ __construct()
| __construct | ( | Session | $session, |
| PersistenceFacade | $persistenceFacade, | ||
| PermissionManager | $permissionManager, | ||
| ActionMapper | $actionMapper, | ||
| Localization | $localization, | ||
| Message | $message, | ||
| Configuration | $configuration, | ||
| PrincipalFactory | $principalFactory, | ||
| EventManager | $eventManager | ||
| ) |
Constructor.
- Parameters
-
$session $persistenceFacade $permissionManager $actionMapper $localization $message $configuration $principalFactory $eventManager
Definition at line 68 of file UserController.php.
Member Function Documentation
◆ changePassword()
| changePassword | ( | ) |
Change the user's password.
| Parameter | Description |
|---|---|
in oldpassword | The old password |
in newpassword1 | The new password |
in newpassword2 | The new password |
Definition at line 94 of file UserController.php.
◆ setConfigValue()
| setConfigValue | ( | ) |
Set a configuration for the user.
| Parameter | Description |
|---|---|
in name | The configuration name |
in value | The configuration value |
Definition at line 124 of file UserController.php.
◆ getConfigValue()
| getConfigValue | ( | ) |
Get a configuration for the user.
| Parameter | Description |
|---|---|
in name | The configuration name |
out value | The configuration value |
Definition at line 168 of file UserController.php.
◆ changePasswordImpl()
|
protected |
Change a users password.
- Parameters
-
$user The User instance $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 199 of file UserController.php.
◆ afterCommit()
| afterCommit | ( | TransactionEvent | $event | ) |
Remove temporary permissions after commit.
- Parameters
-
$event
Definition at line 219 of file UserController.php.