Cookie Handling for Coopermine? Cookie Handling for Coopermine?
 

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]

Main Menu

Cookie Handling for Coopermine?

Started by butterman, September 12, 2006, 04:15:29 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

butterman

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.

Joachim Müller

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 <?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:<?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.

butterman

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.

Nibbler

'they'?

Read bridge/coppermine.inc.php if you want to know how standard coppermine authentication works.