
Philip Monos - 2009-09-24 14:21:07 -
In reply to message 1 from dizzledammit
Create a class "noprotect" extending class "protect" wher you redefine method makeErrorHtml() to an empty function. Then use "noprotect" to access the user.
Here is a simple script where I have tested it.
<?php
include("adminpro_class.php");
include("adminpro_config.php");
class noprotect extends protect
{
// Redéfine makeErrorHtml méthod
function makeErrorHtml()
{
}
}
$noprot=new noprotect();
$user=$noprot->getuser();
if ($user == "")
{
echo "No user is connected";
} else {
echo "User $user is connected";
}
?>
Hope that helps.
PhilM