- $result = $user->updateKeys($original);
- if (!$result) {
- common_log_db_error($user, 'UPDATE', __FILE__);
- // TRANS: Server error thrown on database error removing a registered SMS phone number.
- $this->serverError(_('Could not update user.'));
- return;
- }
- $user->query('COMMIT');
+ // Throws exception on failure. Also performs it within a transaction.
+ $user->updateWithKeys($original);