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   View files Example   Screenshots Screenshots   View files View files (52)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-07-05 (17 hours ago) RSS 2.0 feedNot yet rated by the usersTotal: Not yet counted Not yet ranked
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  
Name: Jorge Castro <contact>
Classes: 32 packages by
Country: Chile Chile
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  
  • doc/login.png
  • doc/register.png
  Files folder image Files  
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

  Files folder image Files  /  example  
File Role Description
Files folder imagecompile (2 files)
Files folder imageicons (5 files)
Files folder imageview (2 files)
  Accessible without login Plain text file 1.initialize.php Example Example script
  Accessible without login Plain text file anotherpage.php Example Example script
  Accessible without login Plain text file autoload.php Example Example script
  Accessible without login Plain text file AutoLoadOne.json Data Auxiliary data
  Plain text file AutoLoadOne.php Class Class source
  Accessible without login Plain text file changepassword.php Example Example script
  Accessible without login Plain text file frontpage.php Example Example script
  Accessible without login Plain text file log.txt Doc. Documentation
  Accessible without login Plain text file login.php Example Example script
  Accessible without login Plain text file logincookieless.php Example Example script
  Accessible without login Plain text file logout.php Example Example script
  Accessible without login Plain text file recover.php Example Example script
  Accessible without login Plain text file register.php Example Example script
  Accessible without login Plain text file registeractivate.php Example Example script
  Accessible without login Plain text file testgenerator.php Example Example script
  Accessible without login Plain text file testtemplate.php Example Example script

  Files folder image Files  /  example  /  compile  
File Role Description
  Accessible without login Plain text file 972d0d3956f68a7dd9...d02da8c8ec9a.bladec Example Example script
  Accessible without login Plain text file e5bd0083ce2c37a3eb...26378b3c409e.bladec Example Example script

  Files folder image Files  /  example  /  icons  
File Role Description
  Accessible without login Image file mailing.png Icon Icon image
  Accessible without login Plain text file mailing.svg Data Auxiliary data
  Accessible without login Image file password.png Icon Icon image
  Accessible without login Image file safe.png Icon Icon image
  Accessible without login Image file unsafe.png Icon Icon image

  Files folder image Files  /  example  /  view  
File Role Description
  Accessible without login Plain text file anotherpage.blade.php Aux. Configuration script
  Accessible without login Plain text file frontpage.blade.php Aux. Configuration script

  Files folder image Files  /  lib  
File Role Description
Files folder imagecompile (14 files)
Files folder imagesql (1 file)
Files folder imageview (8 files)
  Plain text file SecurityOneMysql.php Class Class source

  Files folder image Files  /  lib  /  compile  
File Role Description
  Accessible without login Plain text file 106368db1174d126a4...2590e70078d2.bladec Data Auxiliary data
  Accessible without login Plain text file 13a2828b3adecc1c32...fa51e147b3f3.bladec Example Example script
  Accessible without login Plain text file 2341f8ff216da2985e...a0c4faac8b4f.bladec Example Example script
  Accessible without login Plain text file 2736fab291f04e69b6...361f5b82461a.bladec Example Example script
  Accessible without login Plain text file 55bc5de4ad739fc0c3...bab6c0fd28b7.bladec Example Example script
  Accessible without login Plain text file 85d2cb7f1098b01b26...b451f9176e66.bladec Example Example script
  Accessible without login Plain text file activateok.bladec Example Example script
  Accessible without login Plain text file ccb699b85dcddc0fc8...2497f7eb46bd.bladec Example Example script
  Accessible without login Plain text file f2c57870308dc87f43...6f8e322721ba.bladec Example Example script
  Accessible without login Plain text file login.bladec Example Example script
  Accessible without login Plain text file readme.txt Doc. Documentation
  Accessible without login Plain text file register.bladec Example Example script
  Accessible without login Plain text file registerok.bladec Example Example script
  Accessible without login Plain text file _head.bladec Data Auxiliary data

  Files folder image Files  /  lib  /  sql  
File Role Description
  Accessible without login Plain text file SecUser.sql Data Auxiliary data

  Files folder image Files  /  lib  /  view  
File Role Description
  Accessible without login Plain text file activateok.blade.php Aux. Configuration script
  Accessible without login Plain text file login.blade.php Aux. Configuration script
  Accessible without login Plain text file newpassword.blade.php Aux. Configuration script
  Accessible without login Plain text file recover.blade.php Aux. Configuration script
  Accessible without login Plain text file recoversend.blade.php Aux. Configuration script
  Accessible without login Plain text file register.blade.php Aux. Configuration script
  Accessible without login Plain text file registerok.blade.php Aux. Configuration script
  Accessible without login Plain text file _head.blade.php Aux. Configuration script

 Version Control Unique User Downloads  
 100%
Total:0
This week:0