- update_user_password($_POST['user_id'], md5($_POST['password']));
- display_notification(_("Your password has been updated."));
+ if ($SysPrefs->allow_demo_mode) {
+ display_warning(_("Password cannot be changed in demo mode."));
+ } else {
+ update_user_password($_SESSION["wa_current_user"]->user,
+ $_SESSION["wa_current_user"]->username,
+ md5($_POST['password']));
+ display_notification(_("Your password has been updated."));
+ }