summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/model/common.mod.php11
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");
}