| $args = $this->xero_contact_profile($xero_contact); | $args = $this->xero_contact_profile($xero_contact); | ||||
| $id = wp_insert_user($args); | $id = wp_insert_user($args); | ||||
| if (! id instanceof \WP_Error){ | |||||
| if (! $id instanceof \WP_Error){ | |||||
| $user = get_user_by('ID', $id); | $user = get_user_by('ID', $id); | ||||
| update_user_meta($user->ID, 'address', $args['address']); | update_user_meta($user->ID, 'address', $args['address']); | ||||
| update_user_meta($user->ID, 'account', $args['account']); | update_user_meta($user->ID, 'account', $args['account']); | ||||
| $xero_employee = $this->getEmployee($login); | $xero_employee = $this->getEmployee($login); | ||||
| $args = $this->xero_employee_profile($xero_employee); | $args = $this->xero_employee_profile($xero_employee); | ||||
| $id = wp_insert_user($args); | $id = wp_insert_user($args); | ||||
| if (! id instanceof \WP_Error){ | |||||
| if (! $id instanceof \WP_Error){ | |||||
| $user = get_user_by('ID', $id); | $user = get_user_by('ID', $id); | ||||
| update_user_meta($user->ID, 'mobile', $args['mobile']); | update_user_meta($user->ID, 'mobile', $args['mobile']); | ||||
| update_user_meta($user->ID, 'address', $args['address']); | update_user_meta($user->ID, 'address', $args['address']); |