use session from another site, where put the code? use session from another site, where put the code?
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

use session from another site, where put the code?

Started by hooch, November 16, 2004, 01:29:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hooch

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

Joachim Müller

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