ESP32 Platform Documentation

UserController extends BaseController
in package

Class BaseController

BaseController provides a convenient place for loading components and performing functions that are needed by all your controllers. Extend this class in any new controllers: class Home extends BaseController

For security be sure to declare any new methods as protected or private.

Table of Contents

Properties

$data  : mixed
$helpers  : array<int, string>
An array of helpers to be loaded automatically upon class instantiation. These helpers will be available to all other controllers that extend BaseController.
$request  : CLIRequest|IncomingRequest
Instance of the main Request object.
$user  : mixed
$userModel  : mixed

Methods

__construct()  : mixed
change_password()  : mixed
delete()  : mixed
get_live_route()  : mixed
index()  : string
initController()  : void
new_user()  : string
new_user_create()  : mixed
Create new user
update()  : mixed
generateUniqueUsername()  : string
Create a random unique username
getUserProvider()  : UserModel
Returns the User provider
getValidationRules()  : array<string, array<string, array<int, string>|string>>
Returns the rules that should be used for validation.

Properties

$helpers

An array of helpers to be loaded automatically upon class instantiation. These helpers will be available to all other controllers that extend BaseController.

protected array<int, string> $helpers = ['device', 'download', 'csrf', 'user', 'front/dashboard', 'admin/header', 'admin/footer']

$request

Instance of the main Request object.

protected CLIRequest|IncomingRequest $request

Methods

change_password()

public change_password(int $user_id) : mixed
Parameters
$user_id : int

delete()

public delete(int $user_id) : mixed
Parameters
$user_id : int

get_live_route()

public get_live_route(string $route, mixed ...$args) : mixed
Parameters
$route : string
$args : mixed

index()

public index(int $user_id) : string
Parameters
$user_id : int
Return values
string

initController()

public initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) : void
Parameters
$request : RequestInterface
$response : ResponseInterface
$logger : LoggerInterface

new_user_create()

Create new user

public new_user_create() : mixed

function borrowed from: 'vendor/codeigniter4/shield/src/Con trollers/RegisterController->registerAction()'

update()

public update(int $user_id) : mixed
Parameters
$user_id : int

generateUniqueUsername()

Create a random unique username

protected generateUniqueUsername() : string

Usernames are not used for the login system, but prefer to keep the username field.

Return values
string

getUserProvider()

Returns the User provider

protected getUserProvider() : UserModel
Return values
UserModel

getValidationRules()

Returns the rules that should be used for validation.

protected getValidationRules() : array<string, array<string, array<int, string>|string>>
Return values
array<string, array<string, array<int, string>|string>>

        
On this page

Search results