PHP Classes

File: examples/two-step-login/config.php

Recommend this page to a friend!
  Classes of Subin Siby   Secure PHP Login System   examples/two-step-login/config.php   Download  
File: examples/two-step-login/config.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Secure PHP Login System
Register and login users using a database via PDO
Author: By
Last change: Update of examples/two-step-login/config.php
Date: 4 months ago
Size: 1,739 bytes


Class file image Download
 * For Development Purposes
ini_set('display_errors', 'on');

__DIR__ . '/../../vendor/autoload.php';

$config = array(
'basic' => array(
'company' => 'My Site',
'email' => '',
'db' => array(
'host' => 'localhost',
'port' => 3306,
'username' => 'root',
'password' => '',
'name' => 'test',
'table' => 'users',
'features' => array(
'auto_init' => true,
'two_step_login' => true,
     * These are my localhost paths, change it to yours
'pages' => array(
'no_login' => array(
'everyone' => array(
'login_page' => '/examples/two-step-login/login.php',
'home_page' => '/examples/two-step-login/home.php',
'two_step_login' => array(
'instruction' => 'A token was sent to your E-Mail Address. Please see the mail in your inbox and paste the token found in the textbox below :',
'send_callback' => function (&$LS, $userID, $token) {
$email = $LS->getUser('email', $userID);
$LS->sendMail($email, "Verify Yourself", "Someone tried to login to your account. If it was you, then use the following token to complete logging in : <blockquote>". $token ."</blockquote>If it was not you, then ignore this email and please consider to change your account's password.");

$LS = new \Fr\LS($config);