PHP Classes

File: readme

Recommend this page to a friend!
  Classes of António Lourenço   Lou Login   readme   Download  
File: readme
Role: Documentation
Content type: text/plain
Description: Documentation
Class: Lou Login
Authenticate users stored in a MySQL database
Author: By
Last change:
Date: 9 years ago
Size: 997 bytes
 

Contents

Class file image Download
This class performs the access control users on a system. This class can authenticate users in a database. it's performs a query to the database, retrieve the hashed password of the user account via e-mail. The class compares the typed password with the password database to verify that it is correct for the given user. EXAMPLE : $endereco = new Lou_Auth_User('mail@domain.com', 'xxxxxxxxxx'); var_dump($endereco->isAuthUser()); If you do not want to use the Lou_registo.php file, you can create the table "users" in the database "test" and visit the site http://online-code-generator.com/md5-hash-with-optional-salt.php to generate the md5 hash. Must then insert it into the database table. //criar tabela users 'CREATE TABLE IF NOT EXISTS users ( id INT(5) NOT NULL AUTO_INCREMENT, password VARCHAR(128) NOT NULL, email VARCHAR(255) NOT NULL, PRIMARY KEY(id), UNIQUE KEY(email) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1';