]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Controller/ConfigController.php
Use internal config instead for demo
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Controller / ConfigController.php
index 9ff79ba9f4ce316bde300bc8edcbcfb9e4c53fe1..87196b0ec3f2bb9d1794069a46dd24c2237be49d 100644 (file)
@@ -57,7 +57,7 @@ class ConfigController extends Controller
         $pwdForm->handleRequest($request);
 
         if ($pwdForm->isValid()) {
-            if ($this->getParameter('demo') === true && $this->getParameter('demo_username') === $user->getUsername()) {
+            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.'