55 $authUser = $session->getAuthUser();
58 $oidStr = $authUser->getOID()->__toString();
63 $transaction = $persistenceFacade->getTransaction();
64 $transaction->begin();
66 $this->
changePassword($authUser, $request->getValue(
'oldpassword'),
67 $request->getValue(
'newpassword1'), $request->getValue(
'newpassword2'));
68 $transaction->commit();
72 $transaction->rollback();
75 $permissionManager->clearTempPermissions();
78 $response->setAction(
'ok');
94 if (strlen($newPassword) == 0) {
97 if ($newPassword != $newPasswordRepeated) {
getRequest()
Get the Request instance.
getMessage()
Get the Message instance.
UserController is used to change the current user's password.
User is the interface for users.
Controller is the base class of all controllers.
IllegalArgumentException signals an exception in method arguments.
getPermissionManager()
Get the PermissionManager instance.
changePassword(User $user, $oldPassword, $newPassword, $newPasswordRepeated)
Change a users password.
static fromException(\Exception $ex)
Factory method for transforming an exception into an ApplicationError instance.
getPassword()
Get the password of the user.
verifyPassword($password, $passwordHash)
Verify a password.
setPassword($password)
Set the password of the user.
getResponse()
Get the Response instance.
getSession()
Get the Session instance.
getPersistenceFacade()
Get the PersistenceFacade instance.