Skip to content

Commit

Permalink
remove keys for entities in getMyProfiles endpoint; see glpi-project#964
Browse files Browse the repository at this point in the history
  • Loading branch information
orthagh committed Sep 15, 2016
1 parent 10558a1 commit ee31ff2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions inc/api.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,13 @@ protected function getMyProfiles() {

$myprofiles = array();
foreach($_SESSION['glpiprofiles'] as $profiles_id => $profile) {
// append if of the profile into values
$profile = ['id' => $profiles_id] + $profile;

// don't keep keys for entities
$profile['entities'] = array_values($profile['entities']);

// don't keep keys for profiles
$myprofiles[] = $profile;
}
return array('myprofiles' => $myprofiles);
Expand Down

0 comments on commit ee31ff2

Please sign in to comment.