Skip to content

Commit

Permalink
Fixed bug on edit user webservice: extra fields were not updated beca…
Browse files Browse the repository at this point in the history
…use $extras array were not transformed to associative array before sending it to editUserHelper.
  • Loading branch information
David Nos committed Feb 8, 2016
1 parent ec5fd4a commit 5aa7996
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion main/webservices/webservice_user.php
Expand Up @@ -418,7 +418,15 @@ public function EditUser($secret_key, $user_id_field_name, $user_id_value, $firs
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);
}
Expand Down

0 comments on commit 5aa7996

Please sign in to comment.