from_email: no-reply@wallabag.org
- # this parameter is only used for the wallabag public demo, it means user won't be able to change the password of the default account
+ # this parameter is only used for the wallabag public demo, it means user won't be able to change the password of the demo_user account
demo: false
+ demo_username: wallabag
from_email: no-reply@wallabag.org
- # this parameter is only used for the wallabag public demo, it means user won't be able to change the password of the default account
+ # this parameter is only used for the wallabag public demo, it means user won't be able to change the password of the demo_user account
demo: false
+ demo_username: wallabag
from_email: no-reply@wallabag.org
- # this parameter is only used for the wallabag public demo, it means user won't be able to change the password of the default account
+ # this parameter is only used for the wallabag public demo, it means user won't be able to change the password of the demo_user account
demo: false
+ demo_username: wallabag
from_email: no-reply@wallabag.org
- # this parameter is only used for the wallabag public demo, it means user won't be able to change the password of the default account
+ # this parameter is only used for the wallabag public demo, it means user won't be able to change the password of the demo_user account
demo: false
+ demo_username: wallabag
$pwdForm->handleRequest($request);
if ($pwdForm->isValid()) {
- if ($this->getParameter('demo') === false) {
- $user->setPlainPassword($pwdForm->get('new_password')->getData());
- $userManager->updateUser($user, true);
-
+ if ($this->getParameter('demo') === true && $this->getParameter('demo_username') === $user->getUsername()) {
$this->get('session')->getFlashBag()->add(
'notice',
- 'Password updated'
+ 'In demonstration mode, you can\'t change password for this user.'
);
} else {
+ $user->setPlainPassword($pwdForm->get('new_password')->getData());
+ $userManager->updateUser($user, true);
+
$this->get('session')->getFlashBag()->add(
'notice',
- 'In demonstration mode, you can\'t change password.'
+ 'Password updated'
);
}