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);
$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__);
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);
}