From: Janusz Dobrowolski Date: Sun, 22 Feb 2009 20:18:35 +0000 (+0000) Subject: Password change blocked in demo mode. X-Git-Tag: v2.4.2~19^2~1513 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=416f264d932247bf47339c27fbfcd4b9736bd305;p=fa-stable.git Password change blocked in demo mode. --- diff --git a/admin/change_current_user_password.php b/admin/change_current_user_password.php index 0118d8cb..d38f96cd 100644 --- a/admin/change_current_user_password.php +++ b/admin/change_current_user_password.php @@ -55,8 +55,12 @@ if (isset($_POST['UPDATE_ITEM'])) if (can_process()) { - update_user_password($_POST['user_id'], md5($_POST['password'])); - display_notification(_("Your password has been updated.")); + if ($allow_demo_mode) { + display_warning(_("Password cannot be changed in demo mode.")); + } else { + update_user_password($_POST['user_id'], md5($_POST['password'])); + display_notification(_("Your password has been updated.")); + } $Ajax->activate('_page_body'); } }