try to fix updating in profile
darcs-hash:20080519122445-84dde-b6505e0b8ea310eee50eb6e638238fb7cf93bead.gz
This commit is contained in:
		| @@ -80,5 +80,6 @@ class LoginAction extends Action { | ||||
| 									  'id' => 'cancel', | ||||
| 									  'value' => _t('Cancel'))); | ||||
| 		common_element_end('form'); | ||||
| 		common_show_footer(); | ||||
| 	} | ||||
| } | ||||
|   | ||||
| @@ -67,11 +67,13 @@ class ProfilesettingsAction extends SettingsAction { | ||||
| 		 | ||||
| 		# FIXME: scrub input | ||||
| 		# FIXME: transaction! | ||||
|  | ||||
| 		$original = clone($user); | ||||
| 		 | ||||
| 		$user->nickname = $this->arg('nickname'); | ||||
| 		$user->email = $this->arg('email'); | ||||
| 		 | ||||
| 		if (!$user->update()) { | ||||
| 		if (!$user->update($original)) { | ||||
| 			common_server_error(_t('Couldnt update user.')); | ||||
| 			return; | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user