Skip to content

Commit 657e5a7

Browse files
committed
Handle null value for isAdmin function
1 parent 01a91f5 commit 657e5a7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/Backend/GroupBackend.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,13 +358,13 @@ public function usersInGroup($gid, $search = "", $limit = -1, $offset = 0)
358358
/**
359359
* @inheritdoc
360360
*/
361-
public function isAdmin(string $uid): bool
361+
public function isAdmin(string $uid = null): bool
362362
{
363363
$this->logger->debug(
364364
"Entering isAdmin($uid)", ["app" => $this->appName]
365365
);
366366

367-
if (empty($this->properties[DB::GROUP_ADMIN_COLUMN])) {
367+
if (empty($this->properties[DB::GROUP_ADMIN_COLUMN]) || $uid === null) {
368368
return false;
369369
}
370370

0 commit comments

Comments
 (0)