Airship\Engine\Security\Permissions::checkUsersGroups PHP Method

checkUsersGroups() public method

Check that any of the users' groups has the permission bit
public checkUsersGroups ( string $action = '', integer $context_id = null, integer $user_id = null, boolean $ignore_superuser = false ) : boolean
$action string
$context_id integer
$user_id integer
$ignore_superuser boolean
return boolean
    public function checkUsersGroups(string $action = '', int $context_id = null, int $user_id = null, bool $ignore_superuser = false) : bool
    {
        if (!$ignore_superuser) {
            if ($this->isSuperUser($user_id)) {
                return true;
            }
        }
        return 0 < $this->db->single(\Airship\queryStringRoot('security.permissions.check_users_groups', $this->db->getDriver()), ['action' => $action, 'context' => $context_id, 'user' => $user_id]);
    }