aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller/ConfigController.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/ConfigController.php')
-rw-r--r--src/Wallabag/CoreBundle/Controller/ConfigController.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php
index 31b59845..9ff79ba9 100644
--- a/src/Wallabag/CoreBundle/Controller/ConfigController.php
+++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php
@@ -57,18 +57,18 @@ class ConfigController extends Controller
57 $pwdForm->handleRequest($request); 57 $pwdForm->handleRequest($request);
58 58
59 if ($pwdForm->isValid()) { 59 if ($pwdForm->isValid()) {
60 if ($this->getParameter('demo') === false) { 60 if ($this->getParameter('demo') === true && $this->getParameter('demo_username') === $user->getUsername()) {
61 $user->setPlainPassword($pwdForm->get('new_password')->getData());
62 $userManager->updateUser($user, true);
63
64 $this->get('session')->getFlashBag()->add( 61 $this->get('session')->getFlashBag()->add(
65 'notice', 62 'notice',
66 'Password updated' 63 'In demonstration mode, you can\'t change password for this user.'
67 ); 64 );
68 } else { 65 } else {
66 $user->setPlainPassword($pwdForm->get('new_password')->getData());
67 $userManager->updateUser($user, true);
68
69 $this->get('session')->getFlashBag()->add( 69 $this->get('session')->getFlashBag()->add(
70 'notice', 70 'notice',
71 'In demonstration mode, you can\'t change password.' 71 'Password updated'
72 ); 72 );
73 } 73 }
74 74