]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
save changes to smsemail
authorEvan Prodromou <evan@prodromou.name>
Mon, 21 Jul 2008 04:46:04 +0000 (00:46 -0400)
committerEvan Prodromou <evan@prodromou.name>
Mon, 21 Jul 2008 04:46:04 +0000 (00:46 -0400)
darcs-hash:20080721044604-84dde-c3e920bd56992c4e6a77625767b4599bacc74434.gz

actions/confirmaddress.php
actions/smssettings.php
classes/User.php

index 28849d41b2cb8a838b4ea41dc0e04a70d31c1e99..3cffda8710b59c15efa87ca347c22e087df3e073 100644 (file)
@@ -61,6 +61,8 @@ class ConfirmaddressAction extends Action {
 
                if ($type == 'sms') {
                        $cur->carrier = ($confirm->address_extra)+0;
+                       $carrier = Sms_carrier::staticGet($cur->carrier);
+                       $cur->smsemail = $carrier->toEmailAddress($cur->sms);
                }
 
                $result = $cur->updateKeys($orig_user);
index c2c305128de4903fe4ec737cf911e7c35d094eb5..f0c84ae690a2a5e52bb907e6a613732b53ff6e4f 100644 (file)
@@ -262,6 +262,7 @@ class SmssettingsAction extends EmailsettingsAction {
                $original = clone($user);
                $user->sms = NULL;
                $user->carrier = NULL;          
+               $user->smsemail = NULL;         
                $result = $user->updateKeys($original);
                if (!$result) {
                        common_log_db_error($user, 'UPDATE', __FILE__);
index a6cab262cc8241f0e1c64f3c7dd336bcf81bd8f4..6f4bf1ab2f7c6c67ad9489ffe27a6e3c3aa1dbe9 100644 (file)
@@ -79,7 +79,7 @@ class User extends DB_DataObject
 
        function updateKeys(&$orig) {
                $parts = array();
-               foreach (array('nickname', 'email', 'jabber', 'sms', 'carrier') as $k) {
+               foreach (array('nickname', 'email', 'jabber', 'sms', 'carrier', 'smsemail') as $k) {
                        if (strcmp($this->$k, $orig->$k) != 0) {
                                $parts[] = $k . ' = ' . $this->_quote($this->$k);
                        }