show()

public function show(): void

Description

Displays a single record's details. Requires a valid update ID in the URL (segment 3). If the record doesn't exist, renders a "not found" page instead.

Also determines whether the record belongs to the currently logged‑in user and displays "Your Account Details" for own records or "Record Details" for others.

Parameters

This method accepts no parameters (uses URL segment 3 for the record ID).

Return Value

TypeDescription
voidOutput rendered directly via the admin template.

Example Usage

PHP
// URL: /trongate_administrators/show/42
// Displays record #42 with admin template

// Direct call from another controller
public function view_admin_profile(int $user_id) {
    redirect('trongate_administrators/show/' . $user_id);
}

// Manual redirect after update
set_flashdata('Record updated successfully');
redirect('trongate_administrators/show/' . $update_id);