PHP Classes
elePHPant
Icontem

SMK User Authentication: Authenticate users with MySQL database records

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2006-05-12 (9 years ago) RSS 2.0 feedStarStarStarStar 65%Total: 2,712 All time: 1,313 This week: 1,205Up
Version License Categories  
smk_auth 1.0GNU General Publi...Databases, User Management
Description Author  

This package can be used to authenticate users against a MySQL database of user records.

It can verify whether there is a record for an active user given the user name and password.

If the authentication succeeds, it creates a record for a new session in another database table.

The new session identifier is set to a session cookie. This cookie can be verified in subsequent accesses to determine whether the user was previously authenticated and the session did not expire.

Picture of Andrei
Name: Andrei <contact>
Classes: 1 package by
Country: Romania Romania
Age: 40
All time rank: 107426 in Romania Romania
Week rank: 1504 Down33 in Romania Romania Down

Details provided by the author  
Fist of all, this package is based on the authentication used in mambo/joomla, also including the database
object of this premium CMS (www.joomla.org) . The files are altered to ensure stand-alone functioning of the classes.
Mostly i worked on auth.class.php, in database.php i just got out some code that dd not make sense outside the 
joomla framework

Installing
=============

1. Import the "script.sql" in your MySQL Database (It adds a default user "Testman", password "t")
2. Alter the db.inc.php accourding to your system setup. 
	Please adjust the SESSION timeout since it is maybe to high for you.
3. Build a login page similar to my example "login.php". you should include the two files 
		    require_once('auth.class.php');
			require_once('db.inc.php');
			
4. in all the "registered only" pages include     "require_once('auth.php')" on top. Please check "index.php"


Please write me if you find some bugs or problems

Enjoy

Andrei
gringo696@yahoo.com

	
  Files folder image Files  
File Role Description
Plain text file auth.class.php Class Core Authentication class
Accessible without login Plain text file auth.php Aux. Authentication module
Plain text file database.php Class Database Class (a light version of the one included in the joomla distribution)
Accessible without login Plain text file db.inc.php Conf. Configuration script. Adjust to your Mysql configuration
Accessible without login Plain text file index.php Example Example file that uses authentication
Accessible without login Plain text file login.php Example Example login script.
Accessible without login Plain text file Readme.txt Doc. Documentation, how-to-install
Accessible without login Plain text file script.sql Data Table creation script

 Version Control Unique User Downloads Download Rankings  
 0%Total:2,712All time:1,313
 This week:0This week:1,205Up
User Ratings User Comments (1)  
 All time
Utility:80%StarStarStarStarStar
Consistency:95%StarStarStarStarStar
Documentation:75%StarStarStarStar
Examples:85%StarStarStarStarStar
Tests:-
Videos:-
Overall:65%StarStarStarStar
Rank:501
 
Very useful authentication class.
7 years ago (Alex Capalneanu)
75%StarStarStarStar