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: use session from another site, where put the code?  (Read 2463 times)

0 Members and 1 Guest are viewing this topic.

hooch

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
use session from another site, where put the code?
« 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:

Code: [Select]
<?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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: use session from another site, where put the code?
« Reply #1 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
Logged
Pages: [1]   Go Up
 

Page created in 0.014 seconds with 15 queries.