chandler/chandler/ControlPanel/includes/verify_user.php

11 lines
266 B
PHP

<?php declare(strict_types=1);
use Chandler\Security\Authenticator;
return (function(): ?bool
{
$auth = Authenticator::i();
$user = $auth->getUser();
if(!$user) return NULL;
return $user->can("access")->model("admin")->whichBelongsTo(NULL);
});