Login   Register  
PHP Classes
elePHPant
Icontem

File: ex_auth.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Danny Tucker  >  EZ Framework  >  ex_auth.php  >  Download  
File: ex_auth.php
Role: Example script
Content type: text/plain
Description: Example
Class: EZ Framework
Framework providing several types of functionality
Author: By
Last change:
Date: 2006-03-05 17:10
Size: 623 bytes
 

Contents

Class file image Download
<?php
# Version 1.0
require_once('../include/config.inc.php');

$auth = new auth();

// Check to see if someone is already logged in or not
if( $auth->check() )
    echo 
'Logged In';
else
    echo 
'Not Logged In';

// Log someone in
// Optional 2 params of login function are for using a cookie instead of a session
// Use a cookie and set it for 36 hours
// if( $auth->login( $f->method['login'], md5( $f->method['password'] ), 1, 36 ) )
if( $auth->login$f->method['login'], md5$f->method['password'] ) ) )
    echo 
'Login Success';
else
    echo 
'Login Failed';

// Log someone out
$auth->logout();
    
?>