Authentication Verification

14 years 2 months ago #3138 by spacebass5000
From within index.php, is there a way to find out if a user has been successfully authenticated?

<?php if (user has logged in) { ?>

I am using CB and recognize that this may be a standard Joomla question. I just figured I'd ask here as I have not gotten an answer on Joomla's forums.
14 years 2 months ago #3139 by trail
global $my;
if ($my-id)

DJ Trail.
CB Co-Founder & Test-Lead.
Plugins: My Age , Starsign Matchmaking Horoscope , My Visitor , My Highscores , My ProfileID ,
My Components: Import & Invite Karma Casino (Use Test / Test)
My Modules: Many :)
14 years 2 months ago #3140 by spacebass5000
<?php if ($my->id == 0) { >

will tell you if the user is not logged in.... correct?
14 years 2 months ago #3154 by trail
wrong


global $my;

if ($my-id) { echo "this user is logged in"; } else { echo "this shitface should still log in first"; }

That means .. if $my->id is not empty.. then the user is logged in..

DJ Trail.
CB Co-Founder & Test-Lead.
Plugins: My Age , Starsign Matchmaking Horoscope , My Visitor , My Highscores , My ProfileID ,
My Components: Import & Invite Karma Casino (Use Test / Test)
My Modules: Many :)
Moderators: beatnantkrileon
Time to create page: 0.403 seconds

Facebook Twitter LinkedIn