update_password()

public function update_password(): void

Description

Displays the password update form for a user record. Requires a valid update ID in URL segment 3. The form submits to submit_update_password().

If the record belongs to the currently logged‑in user, the headline reads "Update Your Password". Otherwise it reads "Update Password".

Parameters

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

Return Value

TypeDescription
voidOutput rendered via the admin template.

Example Usage

PHP
// URL: /trongate_administrators/update_password/42
// Shows password update form for user #42

// In a view file (password update link)
<a href="<?= BASE_URL ?>trongate_administrators/update_password/<?= $update_id ?>" 
   class="btn btn-warning">Change Password</a>

// After validation failure in submit_update_password
$this->validation->set_rules('password', 'password', 'required|min_length[8]');
if ($this->validation->run() !== true) {
    $this->update_password(); // Redisplay form with errors
    return;
}