Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: How I get info from login cookie or session.  (Read 2108 times)

0 Members and 1 Guest are viewing this topic.

saymon

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
How I get info from login cookie or session.
« on: November 27, 2008, 11:19:40 pm »

Hi guys,

I'm newby in this soft. I have tryed to find my answer but after days looking the answer to my question I've decided to write here to see who can help me.

I've installed my coppermine gallery and it is running very well, but Also in my website I have made a news program where I need that the surfers can be logged to post the news. I will use the log-in form of coppermine to whole the sections on my website, so I need to figure out how to read or to know that the surfer have logg-in already.

If coppermine create a cockie session how can access to it ? how is named and where is placed ? how can I have this working in this way ?

I thank you any answer of docs that can help me.

Regards
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How I get info from login cookie or session.
« Reply #1 on: November 28, 2008, 09:33:57 am »

Use the fabulous web developer extension for Firefox to figure such things out. Among many other things it allows you to view the cookies issued by a page.
To figure out how cookies are being handled within coppermine, just take a look at the source code. Searching all source code files of coppermine for the term "cookie" should give you an idea what files handle cookies: include/init.inc.php is the place to start. Take a look at that file using your favorite plain text editor, again searching for the word "cookie" and you'll find the lines. However, you'll need some coding skills to be able to do something with the cookie information. It will be easier if you make your cuszom page reside in coppermine's root folder. You can then come up with an easy solution that simply checks for USER_ID, as suggested in countless threads on this board.

Joachim

P.S, Coppermine's authentification scheme is cookie-driven, not PHP-session driven
Logged
Pages: [1]   Go Up
 

Page created in 0.027 seconds with 20 queries.