summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-07-21 00:46:04 -0400
committerEvan Prodromou <evan@prodromou.name>2008-07-21 00:46:04 -0400
commitf538ab414baae8786e88f040f71eedab9d37736e (patch)
treeca92534514b214464ac992b05fea3783d9899987
parent13c1db0bce051136b55dca0d8532b58883567de2 (diff)
save changes to smsemail
darcs-hash:20080721044604-84dde-c3e920bd56992c4e6a77625767b4599bacc74434.gz
-rw-r--r--actions/confirmaddress.php2
-rw-r--r--actions/smssettings.php1
-rw-r--r--classes/User.php2
3 files changed, 4 insertions, 1 deletions
diff --git a/actions/confirmaddress.php b/actions/confirmaddress.php
index 28849d41b..3cffda871 100644
--- a/actions/confirmaddress.php
+++ b/actions/confirmaddress.php
@@ -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);
diff --git a/actions/smssettings.php b/actions/smssettings.php
index c2c305128..f0c84ae69 100644
--- a/actions/smssettings.php
+++ b/actions/smssettings.php
@@ -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__);
diff --git a/classes/User.php b/classes/User.php
index a6cab262c..6f4bf1ab2 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -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);
}