aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/index.php b/index.php
index 91d0b304..0a778d08 100644
--- a/index.php
+++ b/index.php
@@ -54,14 +54,17 @@ elseif (isset($_GET['config'])) {
54 if (isset($_POST['password']) && isset($_POST['password_repeat'])) { 54 if (isset($_POST['password']) && isset($_POST['password_repeat'])) {
55 if ($_POST['password'] == $_POST['password_repeat'] && $_POST['password'] != "") { 55 if ($_POST['password'] == $_POST['password_repeat'] && $_POST['password'] != "") {
56 logm('password updated'); 56 logm('password updated');
57 $store->updatePassword(encode_string($_POST['password'] . $_SESSION['login'])); 57 if (!DEMO) {
58 $msg->add('s', 'your password has been updated'); 58 $store->updatePassword(encode_string($_POST['password'] . $_SESSION['login']));
59 $msg->add('s', 'your password has been updated');
60 }
61 else {
62 $msg->add('i', 'in demo mode, you can\'t update password');
63 }
59 } 64 }
60 else 65 else
61 $msg->add('e', 'your password can\'t be empty and you have to repeat it in the second field'); 66 $msg->add('e', 'your password can\'t be empty and you have to repeat it in the second field');
62 } 67 }
63 else
64 $msg->add('e', 'error in your password update');
65} 68}
66 69
67# Traitement des paramètres et déclenchement des actions 70# Traitement des paramètres et déclenchement des actions