]> git.agnieray.net Git - galette.git/commitdiff
Fix preferences storage on demo
authorJohan Cwiklinski <johan@x-tnd.be>
Mon, 18 Oct 2021 05:06:47 +0000 (07:06 +0200)
committerJohan Cwiklinski <johan@x-tnd.be>
Mon, 18 Oct 2021 05:06:47 +0000 (07:06 +0200)
galette/lib/Galette/Core/Preferences.php

index 461a7d3e3a14b28beb3f433559a2367e9b768e81..92b633e1f50fc895ef5316bde62fa11deedac029 100644 (file)
@@ -495,6 +495,15 @@ class Preferences
             $insert_values[$fieldname] = $value;
         }
 
+        //cleanup fields for demo
+        if (GALETTE_MODE == Galette::MODE_DEMO ) {
+            unset(
+                $insert_values['pref_admin_login'],
+                $insert_values['pref_admin_pass'],
+                $insert_values['pref_mail_method']
+            );
+        }
+
         // missing relations
         if (
             GALETTE_MODE !== Galette::MODE_DEMO