Add phone number field in backoffice profile #75

Merged
bilal.catic merged 5 commits from add-phone-number-field-in-backoffice-profile into development 2018-11-22 13:24:42 +01:00
Showing only changes of commit 68c760a426 - Show all commits

View File

@@ -148,6 +148,10 @@ class Wiaas_REST_Customer_API {
return wiaas_api_notice('ADD_PHONE_NUMBER', 'error', Wiaas_Customer::get_customer_info($customer_id));
}
if (!preg_match('/^[\d +]*$/', $phone)){
return wiaas_api_notice('INVALID_PHONE_NUMBER', 'error', Wiaas_Customer::get_customer_info($customer_id));
};
if (!Wiaas_Customer::update_customer_profile_info($customer_id, $first_name, $last_name, $phone)){
return wiaas_api_notice('PROFILE_NOT_CHANGED', 'warning', Wiaas_Customer::get_customer_info($customer_id));
}