summaryrefslogtreecommitdiff
path: root/actions/password.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-05-20 15:10:32 -0400
committerEvan Prodromou <evan@prodromou.name>2008-05-20 15:10:32 -0400
commit3f5ededc01d8eedac2a9a75917849fbe78a3e701 (patch)
tree50627d9a90854d51f52fa398b044046b382fe3c8 /actions/password.php
parent5d1a6f0fef3b99167babfa304ceda9b67720f399 (diff)
call validate before saving objects
darcs-hash:20080520191032-84dde-64197121c93cd4cf3cbc614badff0bd44547f9f9.gz
Diffstat (limited to 'actions/password.php')
-rw-r--r--actions/password.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/actions/password.php b/actions/password.php
index 6eba136ce..3a89c99d3 100644
--- a/actions/password.php
+++ b/actions/password.php
@@ -64,6 +64,12 @@ class PasswordAction extends SettingsAction {
$user->password = common_munge_password($newpassword, $user->id);
+ $val = $user->validate();
+ if ($val !== TRUE) {
+ $this->show_form(_t('Error saving user; invalid.'));
+ return;
+ }
+
if (!$user->update($original)) {
common_server_error(_t('Can\'t save new password.'));
return;