From f538ab414baae8786e88f040f71eedab9d37736e Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 21 Jul 2008 00:46:04 -0400 Subject: [PATCH] save changes to smsemail darcs-hash:20080721044604-84dde-c3e920bd56992c4e6a77625767b4599bacc74434.gz --- actions/confirmaddress.php | 2 ++ actions/smssettings.php | 1 + classes/User.php | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/actions/confirmaddress.php b/actions/confirmaddress.php index 28849d41b2..3cffda8710 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 c2c305128d..f0c84ae690 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 a6cab262cc..6f4bf1ab2f 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); } -- 2.39.5