Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

ajax_permission_denied()

Description

Returns a standard AJAX response for unauthorised access

The function will return a 401 HTTP status code.

@deprecated

Parameters

This function accepts no parameters.

Return

void

Location

include/ajax_functions.php lines 22 to 32

Definition

 
function ajax_permission_denied()
    {
    
$return['error'] = array(
        
'status' => 401,
        
'title'  => $GLOBALS["lang"]["unauthorized"],
        
'detail' => $GLOBALS["lang"]['error-permissiondenied']);

    
http_response_code(401);
    echo 
json_encode($return);
    exit();
    }

This article was last updated 19th March 2024 09:05 Europe/London time based on the source file dated 18th August 2023 11:30 Europe/London time.