Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: How can I figure out whether the user is logged on or not  (Read 2359 times)

0 Members and 1 Guest are viewing this topic.

windhunter

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
How can I figure out whether the user is logged on or not
« on: April 06, 2004, 10:45:45 am »

I'm making a mod.
I would like to check (on page matej.php) whether the user currently viewing matej.php is logged to the CPG or not.

Can I just look if the cookie of CPG exists? How can I do this?
Is there a simple function integrated into CPG, so I would only have to copy it to matej.php or include it?


tx in advance

matej
Logged

Nibbler

  • Guest
How can I figure out whether the user is logged on or not
« Reply #1 on: April 06, 2004, 12:17:08 pm »

If you include init.inc.php (which you probably are) then you can check USER_ID like this:

Code: [Select]

If (USER_ID)
{
logged in stuff
} else {
user not logged in stuff
}
Logged

windhunter

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
How can I figure out whether the user is logged on or not
« Reply #2 on: April 06, 2004, 12:58:15 pm »

thank you,
that is just what I needed
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 18 queries.