From 3f5ededc01d8eedac2a9a75917849fbe78a3e701 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 20 May 2008 15:10:32 -0400 Subject: call validate before saving objects darcs-hash:20080520191032-84dde-64197121c93cd4cf3cbc614badff0bd44547f9f9.gz --- actions/password.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actions/password.php') 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; -- cgit v1.2.3-54-g00ecf