mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-17 17:08:37 +00:00
Add tests
This commit is contained in:
parent
e5b5270962
commit
b6c00b0b80
2 changed files with 35 additions and 9 deletions
|
@ -58,20 +58,16 @@ class ConfigController extends Controller
|
|||
|
||||
if ($pwdForm->isValid()) {
|
||||
if ($this->get('craue_config')->get('demo_mode_enabled') && $this->get('craue_config')->get('demo_mode_username') === $user->getUsername()) {
|
||||
$this->get('session')->getFlashBag()->add(
|
||||
'notice',
|
||||
'In demonstration mode, you can\'t change password for this user.'
|
||||
);
|
||||
$message = 'In demonstration mode, you can\'t change password for this user.';
|
||||
} else {
|
||||
$message = 'Password updated';
|
||||
|
||||
$user->setPlainPassword($pwdForm->get('new_password')->getData());
|
||||
$userManager->updateUser($user, true);
|
||||
|
||||
$this->get('session')->getFlashBag()->add(
|
||||
'notice',
|
||||
'Password updated'
|
||||
);
|
||||
}
|
||||
|
||||
$this->get('session')->getFlashBag()->add('notice', $message);
|
||||
|
||||
return $this->redirect($this->generateUrl('config').'#set4');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue