forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 bridging => Topic started by: nighteyes on July 22, 2012, 02:11:47 pm

Title: bridging the other way around
Post by: nighteyes on July 22, 2012, 02:11:47 pm
i've been searching this for some time, but its seems very hard to find. lots of people use their own user dbase and bridge that to coppermine, but i would like to do it the other way around.

I managed to find something here:
http://forum.coppermine-gallery.net/index.php/topic,45376.0.html

But this seems to be made for for 1.4.x. will this work for 1.5.x?


What i would like to do is take the usermanagement from coppermine and extend it to the rest of my site. if i could somehow detect the currently logged in username and/or password that would be great. Even better would be if i could move or at least duplicate the login process to another part of the site.

Now i'm not entirely new to php and programming in general, but the way coppermine is coded is way more advanced then my humble skill level, and i'm a bit lost in figuring this out.



Title: Re: bridging the other way around
Post by: Αndré on July 23, 2012, 12:39:26 pm
If you include include/init.inc.php to your custom sites, you'll have all information you need (e.g. the populated constant USER_ID):
Code: [Select]
define('IN_COPPERMINE', true);
include('init.inc.php');

Alternatively you can also rebuild the authentication process (i.e. query Coppermine's database).
Title: Re: bridging the other way around
Post by: nighteyes on August 13, 2012, 11:50:15 am
couldn't get it to work with :include('init.inc.php');

After long puzzling i have managed to use an existing auth.inc.php for version 1.4.x, en succesfully converted it to 1.5.x.

many thanx to  Jordan Coffey for the original.

I've included both the original and my version.

problem solved.