strcmp for comparison
darcs-hash:20080622153220-34904-119cea6c5dbe20e33569287cf9632c07e9768b10.gz
This commit is contained in:
parent
7bf88079a9
commit
1cab6c7d50
|
@ -114,6 +114,7 @@ class ProfilesettingsAction extends SettingsAction {
|
||||||
|
|
||||||
$user->query('BEGIN');
|
$user->query('BEGIN');
|
||||||
|
|
||||||
|
if (strcmp($user->nickname, $nickname) != 0) {
|
||||||
$original = clone($user);
|
$original = clone($user);
|
||||||
|
|
||||||
$user->nickname = $nickname;
|
$user->nickname = $nickname;
|
||||||
|
@ -127,8 +128,9 @@ class ProfilesettingsAction extends SettingsAction {
|
||||||
common_server_error(_t('Couldnt update user.'));
|
common_server_error(_t('Couldnt update user.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($user->email != $email) {
|
if (strcmp($user->email, $email) != 0) {
|
||||||
|
|
||||||
# We don't update email directly; it gets done by confirmemail
|
# We don't update email directly; it gets done by confirmemail
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ class User extends DB_DataObject
|
||||||
function updateKeys(&$orig) {
|
function updateKeys(&$orig) {
|
||||||
$parts = array();
|
$parts = array();
|
||||||
foreach (array('nickname', 'email') as $k) {
|
foreach (array('nickname', 'email') as $k) {
|
||||||
if ($this->$k != $orig->$k) {
|
if (strcmp($this->$k, $orig->$k) != 0) {
|
||||||
$parts[] = $k . ' = ' . $this->_quote($this->$k);
|
$parts[] = $k . ' = ' . $this->_quote($this->$k);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user