Handle null value for isAdmin function

This commit is contained in:
Marcin Łojewski
2018-06-30 23:35:16 +02:00
parent 01a91f54ce
commit 657e5a7ced

View File

@@ -358,13 +358,13 @@ final class GroupBackend extends ABackend implements
/** /**
* @inheritdoc * @inheritdoc
*/ */
public function isAdmin(string $uid): bool public function isAdmin(string $uid = null): bool
{ {
$this->logger->debug( $this->logger->debug(
"Entering isAdmin($uid)", ["app" => $this->appName] "Entering isAdmin($uid)", ["app" => $this->appName]
); );
if (empty($this->properties[DB::GROUP_ADMIN_COLUMN])) { if (empty($this->properties[DB::GROUP_ADMIN_COLUMN]) || $uid === null) {
return false; return false;
} }