]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
update keys for incomingemail
authorEvan Prodromou <evan@prodromou.name>
Mon, 21 Jul 2008 08:56:41 +0000 (04:56 -0400)
committerEvan Prodromou <evan@prodromou.name>
Mon, 21 Jul 2008 08:56:41 +0000 (04:56 -0400)
darcs-hash:20080721085641-84dde-9b29902977f78714188ba5fe8c37b4d603c3c63b.gz

actions/emailsettings.php
classes/User.php

index cbc4f644f36d6de5723cbdb6ef137f3b972ca2d3..2173645f759938057e807d4bbfbc30b601336a06 100644 (file)
@@ -269,8 +269,8 @@ 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."));
                }
index 6f4bf1ab2f7c6c67ad9489ffe27a6e3c3aa1dbe9..e4928eb34af7200f39a5fbd15a5ca16a1367abaf 100644 (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);
                        }