$orig = clone($user);
$user->incomingemail = NULL;
-
- if (!$user->update($orig)) {
+
+ if (!$user->updateKeys($orig)) {
common_log_db_error($user, 'UPDATE', __FILE__);
$this->server_error(_("Couldn't update user record."));
}
$orig = clone($user);
$user->incomingemail = mail_new_incoming_address();
- if (!$user->update($orig)) {
+ if (!$user->updateKeys($orig)) {
common_log_db_error($user, 'UPDATE', __FILE__);
$this->server_error(_("Couldn't update user record."));
}
function updateKeys(&$orig) {
$parts = array();
- foreach (array('nickname', 'email', 'jabber', 'sms', 'carrier', 'smsemail') as $k) {
+ foreach (array('nickname', 'email', 'jabber', 'incomingemail', 'sms', 'carrier', 'smsemail') as $k) {
if (strcmp($this->$k, $orig->$k) != 0) {
$parts[] = $k . ' = ' . $this->_quote($this->$k);
}