Login   Register  
PHP Classes
elePHPant
Icontem

File: simpleLoginDoc.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Logan Dugenoux  >  Simple Login  >  simpleLoginDoc.txt  >  Download  
File: simpleLoginDoc.txt
Role: Documentation
Content type: text/plain
Description: simpleLogin docmumentation file
Class: Simple Login
Multiuser page access managment without database
Author: By
Last change:
Date: 2004-02-10 11:39
Size: 1,396 bytes
 

Contents

Class file image Download
+-------------------------+
|   SIMPLESLOGIN CLASS    |
+-------------------------+

-------------> Summary
Simple multi-user rights managment. Ask to login on protected pages.
Admin manager interface included.
No database. 1 line of code to insert at the top of protected pages.


-------------> Author
Logan Dugenoux - 2004
logan.dugenoux@netcourrier.com
http://www.peous.com/logan/


-------------> License
GPL


-------------> Main methods :
checkLogin()			Ask user to login if not logged, and if logon is wrong, dont displays the page
checkLogin(0)		Ask user to login if not logged, and if logon is wrong, displays the page anyway
checkLogin(0,0)		Don't ask user to login if not logged, see userIsLogged()
ManageUsers()		Displays Manager interface if user is admin
userIsLogged()		Return true if user login is successfull (use with checkLogin(0,0))
userName()			Return the userName the louser logged with
LogOut()				Logs out current user.
						Automatic if page.php?simpleLogin_logOut=1 is used.


-------------> Example :
<?
require "simpleLogin.php";
$sl = new simpleLogin();
$sl->CheckLogin();		this will not display the page if not logged
$sl->ManageUsers();		Put this line if you wand the admin to see the manager interface
?>
You are identified !<br><br>Your user name is <?=$sl->userName();?>
<br><br><a href=?simpleLogin_logOut=1>logout</a>