LoginController
extends z_controller
in package
The Login controller handles all login/logout stuff
Table of Contents
- action_change_password() : mixed
- Redirects the user to the password reset page
- action_create_password() : mixed
- Redirects the user to the password reset page
- action_forgot_password() : mixed
- Serves the forgot password page and resets the a users password
- action_index() : mixed
- The index action
- action_logout() : mixed
- Logs out the requesting user.
- action_reset() : mixed
- Serves the page where the user can reset its password
- action_signup() : mixed
- Controls the view for registering as a user
- action_verify() : mixed
- Used to verify mails
- makeCEDFood() : mixed
- Makes food edible for CED fields
- makeFood() : mixed
- Makes food edible for input selects
- send_verify_mail() : mixed
Methods
action_change_password()
Redirects the user to the password reset page
public
action_change_password(Request $req, Response $res) : mixed
This action is used for user who wat to change their password but did not forgot it.
Parameters
Return values
mixed —action_create_password()
Redirects the user to the password reset page
public
action_create_password(Request $req, Response $res) : mixed
This action is used for user who create their password for the first time
Parameters
Return values
mixed —action_forgot_password()
Serves the forgot password page and resets the a users password
public
action_forgot_password(Request $req, Response $res) : mixed
Parameters
Return values
mixed —action_index()
The index action
public
action_index(Request $req, Response $res) : mixed
It will be called when no action is specified
Parameters
Return values
mixed —action_logout()
Logs out the requesting user.
public
action_logout(Request $req, Response $res) : mixed
Parameters
Return values
mixed —action_reset()
Serves the page where the user can reset its password
public
action_reset(Request $req, Response $res) : mixed
For access the user needs a code he usally gets per mail. This code will also identify the user so he does not need to be logged in to reset his password
Parameters
Return values
mixed —action_signup()
Controls the view for registering as a user
public
action_signup(Request $req, Response $res) : mixed
Parameters
Return values
mixed —action_verify()
Used to verify mails
public
action_verify(Request $req, Response $res) : mixed
Parameters
Return values
mixed —makeCEDFood()
Makes food edible for CED fields
public
makeCEDFood(array<string|int, mixed> $table, array<string|int, mixed> $fields[, mixed $escape = null ]) : mixed
Parameters
- $table : array<string|int, mixed>
-
Table
- $fields : array<string|int, mixed>
-
Fields of the array to get to the client
- $escape : mixed = null
Return values
mixed —makeFood()
Makes food edible for input selects
public
makeFood(array<string|int, mixed> $table, string $valueField, string $textField[, mixed $optionalTextField = null ]) : mixed
Parameters
- $table : array<string|int, mixed>
-
Database table result
- $valueField : string
-
Row that is used as value
- $textField : string
-
Row that is shown to the client as text
- $optionalTextField : mixed = null
Return values
mixed —send_verify_mail()
private
send_verify_mail(Request $req, Response $res, mixed $userId) : mixed