Documentation

auth.php

Table of Contents

Functions

requireLogin()  : void
Require user authentication
requireAdmin()  : void
Require events privileges

Functions

requireLogin()

Require user authentication

requireLogin() : void

Checks if a user session is active and if the user is logged in. Redirects to the login page with an error message if the user is not authenticated.

Tags
author

BDELIVE - Groupe 8

throws
void

Exits execution if user is not authenticated

requireAdmin()

Require events privileges

requireAdmin() : void

Checks if a user session is active, if the user is logged in, and if the user has events status ('BDE'). Redirects to login page if not authenticated, or returns 403 Forbidden if authenticated but not events.

Tags
throws
void

Exits execution if user is not authenticated or not events


        
On this page

Search results