22 $this->load->model(
'module/gluu_sso');
23 $query =
'"UPDATE " . DB_PREFIX . "customer SET ';
24 if($data[
'customer_first_name']){
25 $query.=
" firstname = '" .$this->db->escape($data[
'customer_first_name']).
"',";
27 if($data[
'customer_last_name']){
28 $query.=
" lastname = '" .$this->db->escape($data[
'customer_last_name']).
"',";
30 if($data[
'customer_email']){
31 $query.=
" email = '" .$this->db->escape($data[
'customer_email']).
"',";
33 if($data[
'customer_telephone']){
34 $query.=
" telephone = '" .$this->db->escape($data[
'customer_telephone']).
"',";
36 if($data[
'customer_fax']){
37 $query.=
" fax = '" .$this->db->escape($data[
'customer_fax']).
"',";
39 if($data[
'customer_address_1']){
40 $query.=
" address_1 = '" .$this->db->escape($data[
'customer_address_1']).
"',";
42 if($data[
'customer_address_2']){
43 $query.=
" address_2 = '" .$this->db->escape($data[
'customer_address_2']).
"',";
45 if($data[
'customer_city']){
46 $query.=
" city = '" .$this->db->escape($data[
'customer_city']).
"',";
48 if($data[
'customer_postcode']){
49 $query.=
" postcode = '" .$this->db->escape($data[
'customer_postcode']).
"',";
52 if($data[
'customer_country']){
53 $query.=
" country = '" .(int)$country_id.
"',";
55 if($data[
'customer_zone']){
56 $zone_id = $this->
getZone($data [
'customer_zone'],$country_id)[
'zone_id'] ? $this->
getZone($data [
'customer_zone'],$country_id)[
'zone_id'] : 0;
58 $query.=
" zone = '" .(int)$zone_id.
"',";
60 if($data[
'customer_custom_field']){
61 $query.=
" custom_field = '".$this->db->escape(isset($data[
'custom_field']) ? json_encode($data[
'custom_field']) :
'');
63 $query.=
"' WHERE customer_id = '" . (int)$customer_id .
"'";
64 $this->db->query($query);
getCountry_by_iso($iso_code_2)
Definition: gluu_sso.php:11
getZone($name, $country_id)
Definition: gluu_sso.php:16