fetchPermissionDetails (function)

Last updated: Mon, Apr 17, 2023 9:27 am
Return to Knowledgebase

Purpose

Retrieves the details of a page with a specific ID from the database.

Location

users/helpers/permissions.php

Parameters

# Parameter Data Type Required Description
1 $id integer Yes The ID of the page to retrieve details for.

Returns

Data Type Description of Returned Data
object An object representing the row of the fetched page from the database. The object has the following properties: id (integer) - The ID of the page. page (string) - The name of the page. title (string) - The title of the page. private (integer) - Whether the page is private (1) or not (0). re_auth (integer) - Whether the page requires re-authentication (1) or not (0).

Example

fetchPermissionDetails(2)

Further Documentation:


$page_id = 42;
$page_details = fetchPageDetails($page_id);
echo "Page title: " . $page_details->title;