Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video 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 24th November 2020 20:05 Europe/London time based on the source file dated 18th May 2020 11:26 Europe/London time.