all updates use original now
darcs-hash:20080519122708-84dde-78ec2e47aeb4b33fb83c7d8f5e7f3735d66055ae.gz
This commit is contained in:
parent
2080f52cb1
commit
3a2d17f9f6
@ -66,9 +66,11 @@ class PasswordAction extends SettingsAction {
|
||||
return;
|
||||
}
|
||||
|
||||
$original = clone($user);
|
||||
|
||||
$user->password = common_munge_password($newpassword, $user->id);
|
||||
|
||||
if (!$user->update()) {
|
||||
if (!$user->update($original)) {
|
||||
common_server_error(_t('Can\'t save new password.'));
|
||||
return;
|
||||
}
|
||||
|
@ -80,6 +80,8 @@ class ProfilesettingsAction extends SettingsAction {
|
||||
|
||||
$profile = $user->getProfile();
|
||||
|
||||
$orig_profile = clone($profile);
|
||||
|
||||
$profile->nickname = $user->nickname;
|
||||
$profile->fullname = $this->arg('fullname');
|
||||
$profile->homepage = $this->arg('homepage');
|
||||
@ -87,7 +89,7 @@ class ProfilesettingsAction extends SettingsAction {
|
||||
$profile->location = $this->arg('location');
|
||||
$profile->profileurl = common_profile_url($nickname);
|
||||
|
||||
if (!$profile->update()) {
|
||||
if (!$profile->update($orig_profile)) {
|
||||
common_server_error(_t('Couldnt save profile.'));
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user