PHP Classes

How to Use a PHP Secure Login Library to Implement a Secure Login Page for PHP Applications Using the Package Security One Mysql: Implement a login page for users in a MySQL table

Recommend this page to a friend!
  Info   Example   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-07-05 (9 months ago) RSS 2.0 feedNot enough user ratingsTotal: 66 This week: 1All time: 10,372 This week: 42Up
Version License PHP version Categories
securityonemysql 1.0.0GNU Lesser Genera...5PHP 5, Databases, User Management, Se...
Description 

Author

This package can implement a login page for users in a MySQL table.

It extends the SecurityOne package to provide user login services using a MySQL database to store and retrieve user data.

The package uses PDO to access the MySQL database with the user's table.

Picture of Jorge Castro
  Performance   Level  
Innovation award
Innovation award
Nominee: 14x

Winner: 2x

 

Example

<?php

use eftec\PdoOne;
use
eftec\SecurityOneMysql;
include
"../vendor/autoload.php";

$conn=new PdoOne('mysql',"127.0.0.1","root","abc.123","securitytest","log.txt"); //CREATE SCHEMA `securitytest` ;




try {
   
$conn->connect();

} catch (
Exception $e) {
    die(
"Error :".$e->getMessage());
}

$sec=new SecurityOneMysql($conn,"../lib/");
$sec->blade()->setMode(\eftec\bladeone\BladeOne::MODE_DEBUG);
$sec->initPage="frontpage.php";

$sec->validate();

//$sec->createTables();

$sec->loginScreen("It is a login screen","you should <a href='1.initialize.php'>1.initialize.php</a> first. then the user is admin/admin or user/user");



Details

SecurityOneMysql

It's a security framework for PHP. It includes a login screen that could be customized.

Packagist Total Downloads [License]() [Maintenance]() [composer]() [php]() [php]() [Doc]()

Features

  • Read user from the database.
  • Role-based security (optional)
  • Group base security (optional)
  • Login screen
  • Remember password (via cookie). The cookie doesn't store the user or password but a token).
  • Register screen
  • Activate (after register) screen. The activation is via email.
  • Remember the password screen. It also uses an activation email.

It is totally a beta version. Features could change.

login Login Screen

register Register Screen

version

  • 20200811 1.5.3 php>=5.6
  • 20200811 1.5.2 * Update dependencies. * Fixed a bug creating the tables.
  • 20200405 1.5.1 fixed .gitattributes
  • 20200125 1.5 * More cleanups. * Now it uses pdo and eftec/pdoone to connects to the database.
  • 20181215 1.2 Maintenance
  • 20181028 1.1 It fixes a small bug with the extra fields. Now the extra fields are serialized (if any)
  • 20181027 1.0 Stable version.
  • 20181016 0.16 Changes to login and register screen. Now it's possible to select a different template
  • 20181015 0.15 Updated the version of SecurityOne() to 2.x
  • 20181015 0.14 Updated the version of ValidationOne()
  • 20181015 ~~0.13 Some changes~~
  • 20181003 0.12 Some changes
  • 20180930 0.11 Beta version.

Note

It's distributed as dual license, as lgpl-v3 and commercial. You can use in a commercial and closed source project.


Screenshots (2)  
  • doc/login.png
  • doc/register.png
  Files folder image Files (54)  
File Role Description
Files folder imageexample (16 files, 3 directories)
Files folder imagelib (1 file, 3 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:66
This week:1
All time:10,372
This week:42Up