- if ($this->changed['mobile'] || $this->changed['mobile_pub']) {
- require_once('profil.func.inc.php');
- $fmt_phone = format_phone_number($this->values['mobile']);
- XDB::execute("DELETE FROM profile_phones
- WHERE uid = {?} AND link_type = 'user'",
- S::v('uid'));
- if ($fmt_phone != '') {
- XDB::execute("INSERT INTO profile_phones (uid, link_type, link_id, tel_id, tel_type, search_tel, display_tel, pub)
- VALUES ({?}, 'user', '0', '0', 'mobile', {?}, {?}, {?})",
- S::v('uid'), $fmt_phone, $this->values['mobile'], $this->values['mobile_pub']);
- }
- }