CompteController
extends Controller
in package
Class CompteController
- Manages the user dashboard ("mon compte")
- Displays user profile information and account status
Table of Contents
Properties
- $trans : array<string|int, mixed>
- $mail : PHPMailer
- $token_model : TokensModel
- $translations : array<string|int, mixed>
- $user_model : UsersModel
Methods
- __construct() : mixed
- Initializes models and mailer services
- activer() : void
- Triggers the account activation process for existing users
- index() : void
- Displays the main user dashboard with profile details
- render() : void
- Renders a view file within a layout template.
- sendVerificationEmail() : void
- Dispatches the activation email via smtp
Properties
$trans
protected
array<string|int, mixed>
$trans
= []
Holds translation strings for the current language.
private
PHPMailer
$mail
Instance of the mailer for sending emails.
$token_model
private
TokensModel
$token_model
Handles authentication/activation tokens.
$translations
private
array<string|int, mixed>
$translations
Key/Value pair of translations.
$user_model
private
UsersModel
$user_model
Handles user database operations.
Methods
__construct()
Initializes models and mailer services
public
__construct() : mixed
activer()
Triggers the account activation process for existing users
public
activer() : void
index()
Displays the main user dashboard with profile details
public
index() : void
render()
Renders a view file within a layout template.
public
render(string $file[, array<string|int, mixed> $data = [] ][, string $template = 'default' ]) : void
Parameters
- $file : string
-
The name of the view file (without .php extension).
- $data : array<string|int, mixed> = []
-
Associative array of data to pass to the view.
- $template : string = 'default'
-
The layout template to use (default: 'default').
sendVerificationEmail()
Dispatches the activation email via smtp
private
sendVerificationEmail(string $email, string $token) : void
Parameters
- $email : string
-
recipient address
- $token : string
-
activation code