coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: hooch on November 16, 2004, 01:29:11 AM

Title: use session from another site, where put the code?
Post by: hooch on November 16, 2004, 01:29:11 AM
Hello (again=)

i have another loginscript on my site, is there anyway i can use it on CPG?

the code which checks if the user is logged in is:


<?php
include("core/main.php?);

if (isset(
$_SESSION["wt"]) and $_SESSION["wt"]["logged"])

 show whatever you want.
}
else
{
 user is not logged
}
?>




is there anyway (in some include file) i can put this so you cant enter CPG without having a session from my other loginscript?

Thanks!
/Gustav
Title: Re: use session from another site, where put the code?
Post by: Joachim Müller on November 16, 2004, 05:39:13 AM
with only this code: no. You'll need a user name to be available for coppermine at least. Coppermine can rather easily be made to accept user management (and login information) from other apps, this is what we call "integration". Take a look at the files in the bridge directory of coppermine to get an idea how integration is done and try to come up with a modified bridge file for your other app.

Joachim