Skip to content

Commit

Permalink
Merge pull request #53 from silinternational/develop
Browse files Browse the repository at this point in the history
fullName bug fix in listUsers()
  • Loading branch information
mtompset authored May 16, 2022
2 parents 2feb7d3 + 53516f6 commit b1da6e3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions SilMock/Google/Service/Directory/UsersResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,13 @@ public function listUsers($parameters = [])
$userEntry = json_decode($userRecord['data'], true);
if ($this->doesUserMatch($userEntry, $parameters['query'])) {
/** @var \Google_Service_Directory_UserName $newName */
$newName = new \Google_Service_Directory_UserName(array(
$newName = new \Google_Service_Directory_UserName([
'familyName' => $userEntry['name']['familyName'],
'fullName' => $userEntry['name']['fullName'],
'fullName' =>
$userEntry['name']['fullName'] ??
$userEntry['name']['givenName'] . ' ' . $userEntry['name']['familyName'],
'givenName' => $userEntry['name']['givenName'],
));
]);
/** @var \Google_Service_Directory_User $newEntry */
$newEntry = new \Google_Service_Directory_User(array(
'primaryEmail' => $userEntry['primaryEmail'],
Expand Down

0 comments on commit b1da6e3

Please sign in to comment.