 |
 |
 |
 |
#315230 - 08/16/07 03:15 PM
Re: User Authentication Class
[Re: AllenAyres]
|
Power User
Registered: 11/15/03
Posts: 85
Loc: UK
|
Find: Replace with: The constructor didn't get renamed when I renamed the class. I can't wait until Threads stops supporting PHP 4.X Done but still not working. ?? Snip it from the includes file.
class user_auth {
var $fields;
var $is_logged_in;
var $permissions;
var $is_banned;
var $groups;
function user_auth() {
global $config, $dbh;
My page is test.php
<?php
include ('/home/xxxxx/domains/xxxxxxxxx/public_html/forums/includes/user_auth.inc.php');
if( $userob->is_logged_in ) { if( $userob->is_banned ) { echo "Go away, " . $userob->fields['USER_DISPLAY_NAME']; } else { echo "Welcome, " . $userob->fields['USER_DISPLAY_NAME']; } } else { echo "Please register<br />"; }
echo "Script has ran. <br />";
?>
1. I am logged into my forums 2. Output = "Please register" 3. No errors out put ?? I cant understand what's wrong? Its there a die script i can do for the sql? To see where its failing?? Thanks for the help and assistance as always.
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#316733 - 02/19/08 02:39 PM
Re: User Authentication Class
[Re: Mark_S]
|
Power User
Registered: 11/15/03
Posts: 85
Loc: UK
|
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#317388 - 07/08/08 06:11 PM
Re: User Authentication Class
[Re: blaaskaak]
|
Bada bing!
Enthusiast
Registered: 11/08/03
Posts: 439
Loc: SoCal
|
as long as you include user.inc.php in your user auth dude, the code would be $yarp = new user(); if (!$yarp->check_access('forum','READ_TOPICS',$board)) {
echo 'Ciao bella!';
exit;
}
if ($yarp->check_access('site','CAN_USE_ARCADE')) {
echo 'w00t! and arcade :)';
}
reason for $userobaxx is that $userob is prolly in use for the user_auth dealio  so to modify my original post a bit: include ('../libs/forums/includes/user.inc.php');
include ('../libs/forums/includes/user_auth.inc.php');
$muhaha = new user_auth(); $yarp = new user();
if( $muhaha->is_logged_in ) {
if( $muhaha->is_banned ) {
echo "*cough* be gone, " . $muhaha->fields['USER_DISPLAY_NAME'];
}
else {
echo "Waaazzaaaap, " . $muhaha->fields['USER_DISPLAY_NAME'];
}
} else { echo "Please register<br />";
}
echo "Veni, vidi, vici!! <br />";
if (!$yarp->check_access('forum','READ_TOPICS',$board)) {
echo 'Ciao bella!';
exit;
}
if ($yarp->check_access('site','CAN_USE_ARCADE')) {
echo 'w00t! and arcade :)';
}
?>
|
|
Top
|
|
|
|
 |
 |
 |
 |
|
|