If User is Logged In/Out

Posted by jyaron 
Re: If User is Logged In/Out
July 18, 2008 10:53PM
Never mind :) I definitely got it to work.

Much as I think this isn't necessary, for those who are reading this topic and want an example of how to see if a user is an admin, the code is as follows:

if($USER["admin"]=="1"){
	echo "You're an admin!";
}
Re: If User is Logged In/Out
July 19, 2008 05:08AM
You can abbreviate that to
if ($USER['admin']) { ... }
or at least treat the integer as an integer by writing "1" as plain 1.

Of course it will work this way too, so you don't have to mind my anal programming habits ;-)


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: If User is Logged In/Out
September 30, 2008 11:28AM
Brian,

I just wanted to say that your quick-auth script is AWESOME. I just started looking for something like this, and found yours - it worked perfectly as soon as I changed the file path.

I'll be integrating it into a Zen-Cart install (so users are already logged in), and later on for other things too.

Thanks for sharing this!
Sp

------------------------
Sean Phelan
Sites By Sequoia - Web Marketing ... The Experts at Building Your Success Online
Sorry, only registered users may post in this forum.

Click here to login