PHP Advanced Login System


PHP Advanced Login System as part of the Francium Project

See this Blog Post for more details


logSys includes but not limited to :

  • Basic Login/Register
  • Secure - Uses PDO, Bcrypt & Protection against CSRF
  • Password Reset (Forgot Password) functionality
  • 2 Step Login (2 Step Verification by Mobile SMS/E-Mail)
  • Email Functionality
  • Add & use custom user data
  • Admin Panel
  • Device Manager to know the devices that are currently logged in
  • Debugging/Logging made simpler
  • Simple Examples to get you started
  • Lightweight (42 KB of Awesomeness...)
  • A very active project


Simply download LS.php file and include it in PHP :

require_once "LS.php";

or use Composer :

composer require francium/logsys


The Blog Post contains the entire information on how to install and use logSys.

In case of GitHub repo, the following folders contain examples of usage

  • example-basic
  • example-two-step-login

PHP's mail() function is used to send emails. Most likely, emails sent through it will reach the SPAM folder. To avoid this, add an email function in config -> basic -> email_callback.

I recommend to use PHPMailer (SMTP) or Mailgun API to send emails.



Requires PHP 5.5 - If you want to use it in an older PHP version, get the password.php file from here and include it before loading LS.php file.

This version changes the algorithm used to hash passwords. If you're using an old version of logSys, you cannoot upgrade without resetting the existing passwords in your database.


  • (For upgrading from old versions) Remove all existing values in password column in your table
  • Remove password_salt column from your users' table and set the length of the password column to 255.
  • Update "LS.php" file. If it's class.logsys.php, rename it to LS.php


Run phpunit.


Edit phpunit.xml and change DB_TYPE value to either mysql or sqlite :

<var name="DB_TYPE" value="sqlite" />