Skip to content

Commit

Permalink
GroupService.php : bug res
Browse files Browse the repository at this point in the history
  • Loading branch information
phili67 committed Jan 5, 2024
1 parent 8e3b58b commit bc7dafa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/EcclesiaCRM/Service/GroupService.php
Original file line number Diff line number Diff line change
Expand Up @@ -459,10 +459,11 @@ public function getGroupMembers($groupID, $personID = null)
//on teste si les propriétés sont bonnes
if (array_key_exists('p2g2r_per_ID',$row) && array_key_exists('lst_OptionName',$row))
{
$dbPerson = PersonQuery::create()->findPk($row['p2g2r_per_ID'])->toArray();
$dbPerson = PersonQuery::create()->findPk($row['p2g2r_per_ID']);

if (array_key_exists('displayName',$dbPerson))
if (!array_key_exists('displayName',$dbPerson->toArray()))
{
$person['per_ID'] = $dbPerson->getId();
$person['displayName'] = $dbPerson->getFullName();
$person['groupRole'] = $row['lst_OptionName'];
array_push($members, $person);
Expand Down

0 comments on commit bc7dafa

Please sign in to comment.