public static function revoke($userId = null, $role = null, $action = null, $objectType = '*', $objectId = 0)
    {
        global $PPHP;
        $success = $db = $PPHP['db'];

        if ($objectId === '') {
            $objectId = 0;
        };
        if ($userId !== null  &&  $role !== null) {
            $success = $db->exec(
                "
                DELETE FROM users_roles WHERE userId=? AND role=?
                ",
                array(
                    $userId,
                    $role
                )
            );
        } elseif ($userId !== null  &&  $action !== null) {
            $success = $db->exec(
                "
                DELETE FROM acl_users
                WHERE userId=? AND action=? AND objectType=? AND objectId=?
                ",
                array(
                    $userId,
                    $action,
                    $objectType,
                    $objectId
                )
            );
        } elseif ($role !== null  &&  $action !== null) {
            $success = $db->exec(
                "
                DELETE FROM acl_roles
                WHERE role=? AND action=? AND objectType=? AND objectId=?
                ",
                array(
                    $role,
                    $action,
                    $objectType,
                    $objectId
                )
            );
        };

        if (($userId !== null && $_SESSION['user']['id'] == $userId)
            || ($role !== null && self::hasRole($role))
        ) {
            self::reload();
        };

        return $success;
    }