X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Fchange_current_user_password.php;h=d38f96cd2b3a679e2ca3ba0c61f1e5e562e70bb9;hb=54d84ff9a67620ab38c676cdbcf87853632724f0;hp=1f739243e21ff1b7fa2e9fb6765434e5e78cc46e;hpb=c09be0dad6b05131e240349a375af7a4b7bf3444;p=fa-stable.git diff --git a/admin/change_current_user_password.php b/admin/change_current_user_password.php index 1f739243..d38f96cd 100644 --- a/admin/change_current_user_password.php +++ b/admin/change_current_user_password.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security=1; $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); @@ -46,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'); } }