diff options
author | Evan Prodromou <evan@controlezvous.ca> | 2008-06-22 11:32:20 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlezvous.ca> | 2008-06-22 11:32:20 -0400 |
commit | 1cab6c7d5043ce60469b9590aeb846034d575335 (patch) | |
tree | 063b5d7927f7578aec8a0db2f5e2a6a2507f3eb6 /actions | |
parent | 7bf88079a9bade4570f75f1b41479d2dcccf24ca (diff) |
strcmp for comparison
darcs-hash:20080622153220-34904-119cea6c5dbe20e33569287cf9632c07e9768b10.gz
Diffstat (limited to 'actions')
-rw-r--r-- | actions/profilesettings.php | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/actions/profilesettings.php b/actions/profilesettings.php index 30dbd89ec..b23a43f87 100644 --- a/actions/profilesettings.php +++ b/actions/profilesettings.php @@ -114,21 +114,23 @@ class ProfilesettingsAction extends SettingsAction { $user->query('BEGIN'); - $original = clone($user); + if (strcmp($user->nickname, $nickname) != 0) { + $original = clone($user); - $user->nickname = $nickname; + $user->nickname = $nickname; - common_debug('Old nickname = ' . $original->nickname . ', new nickname = ' . $user->nickname, __FILE__); + common_debug('Old nickname = ' . $original->nickname . ', new nickname = ' . $user->nickname, __FILE__); - $result = $user->updateKeys($original); + $result = $user->updateKeys($original); - if ($result === FALSE) { - common_log_db_error($user, 'UPDATE', __FILE__); - common_server_error(_t('Couldnt update user.')); - return; + if ($result === FALSE) { + common_log_db_error($user, 'UPDATE', __FILE__); + common_server_error(_t('Couldnt update user.')); + return; + } } - if ($user->email != $email) { + if (strcmp($user->email, $email) != 0) { # We don't update email directly; it gets done by confirmemail |