login

From CashCrusaderWiki

Revision as of 15:06, 1 August 2008 by Jutaky (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Function login() is used to make sure member is logged in before viewing the page. Two optional parameters is accepted to determine whether deny or allow certain membertypes. Login() should be used after including setup.php, but before including header.php.


Required CashCrusader version: 1.99


Example usage #1:
General login requirement:

login();


Example usage #2:
Only allow advertisers:

login('allow','advertiser');


Example usage #3:
Deny advertiser access:

login('deny','advertiser');


Example usage #4:
Only allow "Gold" and "Silver" upgraded members to access the page:

login('allow','Gold|Silver');


Example usage in context:
<?php
include("setup.php");
login('deny','advertiser');
include("header.php");
?>

Personal tools
Administration manual