addMobilePhoneNumberField(); } /** * addMobilePhoneNumberField (adds a mobile phone number field if it is not * already created). */ private function addMobilePhoneNumberField() { $extraField = new ExtraField('user'); $extraFieldInfo = $extraField->get_handler_field_info_by_field_variable('mobile_phone_number'); if (empty($extraFieldInfo)) { $extraField->save([ 'field_type' => 1, 'variable' => 'mobile_phone_number', 'display_text' => $this->get_lang('mobile_phone_number'), 'default_value' => null, 'field_order' => 2, 'visible' => 1, 'changeable' => 1, 'filter' => null, ]); } } }