username_check()

public function username_check(string $str): string|bool

Description

Checks the availability of a username and validates it against existing usernames in the 'trongate_administrators' table.

This method is designed to be invoked as a form validation callback.

Parameters

Parameter Type Description Default Required
$str string The username to be checked. N/A Required

Return Value

Type Description
string|bool Returns an error message (string) if the username is not available, otherwise returns TRUE (bool).

Example Usage