forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: fidhleir on April 07, 2009, 01:22:38 am
-
I have a multi-user password protected gallery. When I email a URL link to a photo or album, the recipient clicks the link and the login screen appears. After they login, the gallery home page is displayed. Is there any way to have Coppermine take them directly to the URL I sent after they've logged in? As far as I can tell, after logging into the gallery they have to go back to the email and click the link again.
I've searched the documentation and the forums and can't find anything about this. Any help would be appreciated.
-
You should be able to do this quite easily. Look through the following files
./index.php
./displayimage.php
./search.php
./thumbnails.php
find this code near the start
if (!USER_ID && $CONFIG['allow_unlogged_access'] == 0) {
$redirect = $redirect . "login.php";
header("Location: $redirect");
exit();
}
and change it like this:
if (!USER_ID && $CONFIG['allow_unlogged_access'] == 0) {
$redirect = "login.php?referer=$REFERER";
header("Location: $redirect");
exit();
}
-
Very nice. Thank you. I'll give that a try.
-
That worked perfectly. Thank you again.