diff --git a/Controller/GrouperGroupsController.php b/Controller/GrouperGroupsController.php index 1208bcf..d73199d 100644 --- a/Controller/GrouperGroupsController.php +++ b/Controller/GrouperGroupsController.php @@ -140,10 +140,12 @@ public function beforeFilter() $roles = $this->Role->calculateCMRoles(); $co_person_id = $roles['copersonid']; // Get the act as data from the database - $args = []; - $args['conditions']['ActAsPerson.co_person_id'] = $co_person_id; - $args['contain'] = false; - $act_as_record = $this->ActAsPerson->find('first', $args); + if(!empty($co_person_id)) { + $args = []; + $args['conditions']['ActAsPerson.co_person_id'] = $co_person_id; + $args['contain'] = false; + $act_as_record = $this->ActAsPerson->find('first', $args); + } $this->set('vv_act_as_people', []); // Get ActAs configuration