LightMVC Banner

LightMVC Framework Lockdown Module

Easily add an authentication mechanism to the LightMVC Skeleton Application!


  1. Copy and paste (merge and replace) all of the module's files to the root directory of your LightMVC Skeleton Application installation,
  2. Import the 'db_data_lockdown.sql' file to the appropriate database (ex. $ mysql -uroot fw < data/db_data_lockdown.sql),
  3. Add the PSR-4 namespaces and the required dependencies found in the 'lockdown_composer.json' file to the main 'composer.json' file of the Skeleton Application installation,
  4. Run composer update,
  5. Add the line require 'lockdown.config.php'; at the end of the 'config/config.local.php' file.

Once done, the Lockdown authentication module will be working.

It is possible to verify if a user is authenticated by checking if the loggedin index is set within the application's session object. Moreover, other indexes, like firstname, lastname, username, usergroup, and id will also be set within the session object.

In the 'data' folder of this module, it is possible to find an example of an IndexController, with its corresponding template, which uses the session object in order to check if a user is logged in or not, and display the session information within its template accordingly.

Have a lot of fun! :)