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: [Solved]: Link to password protected gallery  (Read 2278 times)

0 Members and 1 Guest are viewing this topic.

fidhleir

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
[Solved]: Link to password protected gallery
« 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.
« Last Edit: April 07, 2009, 05:31:32 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: Link to password protected gallery
« Reply #1 on: April 07, 2009, 01:41:14 am »

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

Code: [Select]
if (!USER_ID && $CONFIG['allow_unlogged_access'] == 0) {
    $redirect = $redirect . "login.php";
    header("Location: $redirect");
    exit();
}

and change it like this:

Code: [Select]
if (!USER_ID && $CONFIG['allow_unlogged_access'] == 0) {
    $redirect = "login.php?referer=$REFERER";
    header("Location: $redirect");
    exit();
}
Logged

fidhleir

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Link to password protected gallery
« Reply #2 on: April 07, 2009, 01:59:44 am »

Very nice.  Thank you.  I'll give that a try.
Logged

fidhleir

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Link to password protected gallery
« Reply #3 on: April 07, 2009, 04:51:00 pm »

That worked perfectly.  Thank you again.
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 19 queries.