Fixed bug on edit user webservice: extra fields were not updated because $extras array were not transformed to associative array before sending it to editUserHelper.

1.10.x
David Nos 9 years ago
parent ec5fd4a69d
commit 5aa7996ad3
  1. 10
      main/webservices/webservice_user.php

@ -418,7 +418,15 @@ class WSUser extends WS {
if($verifKey instanceof WSError) {
$this->handleError($verifKey);
} else {
$result = $this->editUserHelper($user_id_field_name, $user_id_value, $firstname, $lastname, $status, $loginname, $password, $encrypt_method, $email, $language, $phone, $expiration_date, $extras);
$extras_associative = array();
if (!empty($extras)) {
foreach($extras as $extra) {
$extras_associative[$extra['field_name']] = $extra['field_value'];
}
}
$result = $this->editUserHelper($user_id_field_name, $user_id_value, $firstname, $lastname, $status, $loginname, $password, $encrypt_method, $email, $language, $phone, $expiration_date, $extras_associative);
if($result instanceof WSError) {
$this->handleError($result);
}

Loading…
Cancel
Save