diff options
author | Malf Furious <m@lfurio.us> | 2016-03-10 20:41:23 -0500 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2016-03-27 20:16:32 -0400 |
commit | e14bce5a9de98df6d19ea4ce7243bc7b19c7904b (patch) | |
tree | cde102e26863c85cbc2e7bcab0187a7fa8d9ed05 | |
parent | c93ae572abf32262137cce69f1c020e9a5b46d9f (diff) | |
download | scrott-e14bce5a9de98df6d19ea4ce7243bc7b19c7904b.tar.gz scrott-e14bce5a9de98df6d19ea4ce7243bc7b19c7904b.zip |
Fix function CommonModel::saveSettingUser()
Farious fixes for this form submission handler
* missspelled variable names (*Password => *Passwd)
* Added a notice message for password change success
Diffstat (limited to '')
-rw-r--r-- | app/model/common.mod.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/model/common.mod.php b/app/model/common.mod.php index 9289c21..cbcbd4b 100644 --- a/app/model/common.mod.php +++ b/app/model/common.mod.php @@ -40,8 +40,8 @@ class CommonModel extends MasterModel $form->field_text("curPasswd", null, false); $form->field_text("newPasswd", null, false); $form->field_text("confPasswd", null, false); - $form->field_text("alias", null, false); - $form->field_text("email", null, false); + $form->field_text("alias", "", false); + $form->field_text("email", "", false); $form->field_text("emailConfKey", null, false); if (!$form->populate($input)) @@ -60,10 +60,13 @@ class CommonModel extends MasterModel if ($form->setPasswd == "true") { - if ($user->validatePassword($form->curPassword)) + if ($user->validatePassword($form->curPasswd)) { - if ($form->newPasswd == $form->confPassword) + if ($form->newPasswd == $form->confPasswd) + { $user->setPassword($form->newPasswd); + $this->logNotice("Password updated successfully"); + } else $this->logWarning("Password not changed -- Passwords did not match"); } |