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: Cookie Handling for Coopermine?  (Read 2704 times)

0 Members and 1 Guest are viewing this topic.

butterman

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Cookie Handling for Coopermine?
« on: September 12, 2006, 04:15:29 pm »

Hi all,

I am new to this forum and wondering if someone can help me with a cookie issue.

I have my site that I want to integrate with coppermine.  I want the same session on my site and coopermine.
When someone registers on my site, I UPDATE the coopermine "user" table and puts the proper credentials. That rocks.  However, when someone logs in to my site, I am not sure what to put in the coppermine "session" table.

It seems there are two cookies that Coopermine uses "cpg149_data" and something else.    There are some functions from the functions.inc.php like "user_get_profile()" and "save_user_profile()" but I am not sure what to put in these cookie data and what to insert in the coopermine session table.

This is Coppermin 1.4.9.  Have anyone tried to integrate?
Thank you.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Cookie Handling for Coopermine?
« Reply #1 on: September 12, 2006, 05:57:38 pm »

I wouldn't fiddle with sessions and cookies... Why don't you just integrate a coppermine login box into your overall site instead. Alternatively, if all your non-coppermine pages can easily be moved into the folder where coppermine resides, just add
Code: [Select]
<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
to those pages at the very top and you should be fine.
If you want all your pages to show the navigation as well, your files should look like this:
Code: [Select]
<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
pageheader('Your page title');
?>

Your custom content goes here
<?php
pagefooter
();
ob_end_flush();

If this is not an option, you'll have to read the cookie only.
Logged

butterman

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Cookie Handling for Coopermine?
« Reply #2 on: September 12, 2006, 08:51:09 pm »

Yeah,

I 'd love to do what you are suggesting, however, I built my site before coppermine.  Its an after though really.
It would be really nice if there was some sort of description on how they wrote the cookies and what values they actually import into the tables.
Logged

Nibbler

  • Guest
Re: Cookie Handling for Coopermine?
« Reply #3 on: September 12, 2006, 09:27:36 pm »

'they'?

Read bridge/coppermine.inc.php if you want to know how standard coppermine authentication works.
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 20 queries.