]> git.agnieray.net Git - galette.git/commitdiff
Fix superadmin login removed on demo mode
authorJohan Cwiklinski <johan@x-tnd.be>
Mon, 11 May 2020 12:53:22 +0000 (14:53 +0200)
committerJohan Cwiklinski <johan@x-tnd.be>
Mon, 11 May 2020 12:53:22 +0000 (14:53 +0200)
galette/lib/Galette/Core/Preferences.php

index f7e5032c5b573dd7a7a5ab306617ed4a8ae9a86b..8144502edc1a5b78ada1d6934b1fb5bb0474ccd2 100644 (file)
@@ -631,6 +631,11 @@ class Preferences
             $stmt = $this->zdb->sql->prepareStatementForSqlObject($update);
 
             foreach (self::$defaults as $k => $v) {
+                if (GALETTE_MODE == 'DEMO'
+                    && in_array($k, ['pref_admin_pass', 'pref_admin_login', 'pref_mail_method'])
+                ) {
+                    continue;
+                }
                 Analog::log('Storing ' . $k, Analog::DEBUG);
 
                 $value = $this->prefs[$k];