diff --git a/actions/all.php b/actions/all.php index a8b08565aa..c19440052f 100644 --- a/actions/all.php +++ b/actions/all.php @@ -31,7 +31,7 @@ class AllAction extends StreamAction { $user = User::staticGet('nickname', $nickname); if (!$user) { - $this->no_such_user(); + $this->client_error(_t('No such user: ') . $nickname); return; } diff --git a/actions/profilesettings.php b/actions/profilesettings.php index bca86a85f3..19157e9ca1 100644 --- a/actions/profilesettings.php +++ b/actions/profilesettings.php @@ -114,22 +114,21 @@ class ProfilesettingsAction extends SettingsAction { $user->query('BEGIN'); - if ($user->nickname != $nickname) { - - $original = clone($user); - - $user->nickname = $nickname; - - $result = $user->updateKeys($original); - - if (!$result) { - common_log_db_error($user, 'UPDATE', __FILE__); - common_server_error(_t('Couldnt update user.')); - return; - } + $original = clone($user); + + $user->nickname = $nickname; + + $result = $user->updateKeys($original); + + if ($result === FALSE) { + common_log_db_error($user, 'UPDATE', __FILE__); + common_server_error(_t('Couldnt update user.')); + return; } - if ($email != $user->email) { + if ($user->email != $email) { + + # We don't update email directly; it gets done by confirmemail $confirm = new Confirm_email(); $confirm->code = common_good_rand(16);