update keys for incomingemail

darcs-hash:20080721085641-84dde-9b29902977f78714188ba5fe8c37b4d603c3c63b.gz
This commit is contained in:
Evan Prodromou 2008-07-21 04:56:41 -04:00
parent d515fae0a8
commit 98af7402c7
2 changed files with 4 additions and 4 deletions

View File

@ -270,7 +270,7 @@ class EmailsettingsAction extends SettingsAction {
$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."));
}
@ -284,7 +284,7 @@ class EmailsettingsAction extends SettingsAction {
$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."));
}

View File

@ -79,7 +79,7 @@ class User extends DB_DataObject
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);
}