summaryrefslogtreecommitdiff
path: root/actions/profilesettings.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-06-18 23:36:19 -0400
committerEvan Prodromou <evan@prodromou.name>2008-06-18 23:36:19 -0400
commit7258969cd48d9e11e500db56665e190d05d1e4c0 (patch)
tree11df76e1e8e8b48c476b5ec062638973fa2bddf9 /actions/profilesettings.php
parent4aedce6864eb27a0c37b3dcae22fee0aa16ae537 (diff)
use query method to do some transactions
darcs-hash:20080619033619-84dde-e4fcc00f5d86cb0d11feff5f88f719ea72d3318e.gz
Diffstat (limited to 'actions/profilesettings.php')
-rw-r--r--actions/profilesettings.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/actions/profilesettings.php b/actions/profilesettings.php
index 159dab18a..75e3758ab 100644
--- a/actions/profilesettings.php
+++ b/actions/profilesettings.php
@@ -112,16 +112,13 @@ class ProfilesettingsAction extends SettingsAction {
$user = common_current_user();
assert(!is_null($user)); # should already be checked
- # FIXME: transaction!
-
+ $user->query('BEGIN');
+
$original = clone($user);
$user->nickname = $nickname;
$user->email = $email;
- common_debug('Updating, nickname ="'.$user->nickname.'" and email ="'.$user->email.'"');
- common_debug('Original, nickname ="'.$original->nickname.'" and email ="'.$original->email.'"');
-
$result = $user->update($original);
if (!$result) {