Location: PHPKode > scripts > CAuth > cauth/info.txt
***************This is the Infofile for using the Class CAuth*************
Before you can use this you've to edit CSession.php and CAuth.php. Search for mysql_connect and overwrite username, password, and host with your data. Then we can use it.
It is really simple how you do that.

Just create a new instance of the Class CAuth with 
<?php
include("CAuth.php");
$auth = new CAuth(str username, str password, bool debug(optional));
?>
Now, the Script connects to the MySQL database and checks if the username or password are valid. If the system knows the user then it fetches his data, like his group and his rights on the system. Then the next thing is writing the fetched data into the session with:
<?php
$auth->write_to_session();
?>
Now you've to check if the user is authenticated or not. You can brief it with the variable 
<php 
if($auth->authenticated==1){
     HTML & PHP Code
     .
     .
     .
}
else{
     echo "You are not authenticated";
     .
     .
     .
}
?>

That's all. I hope i've described it clearly enough. If not just email to
hide@address.com

So long Cowboys.
Return current item: CAuth