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: User logging in directly to their their albums (gallery)  (Read 6913 times)

0 Members and 1 Guest are viewing this topic.

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
User logging in directly to their their albums (gallery)
« on: September 06, 2006, 09:33:11 am »

Let see what can I do for you ;)

Here is 1.4.x version of this hack

Keep in mind , This is Core Hack and you should be careful ,Also always take a backup

- Edit bridge/coppermine.inc.php around line 119 and
replace

Code: [Select]
$sql =  "SELECT user_id, user_name, user_password FROM {$this->usertable} WHERE ";

with

Code: [Select]
$sql =  "SELECT user_id, user_group, user_name, user_password FROM {$this->usertable} WHERE ";

- Edit login.php lines 39 & 40 and
replace

Code: [Select]
pageheader($lang_login_php['login'], "<META http-equiv=\"refresh\" content=\"3;url=$referer\">");
msg_box($lang_login_php['login'], sprintf($lang_login_php['welcome'], $USER_DATA['user_name']), $lang_continue, $referer);

with

Code: [Select]
if ($USER_DATA['user_group'] != 1) {
    $user_cat = FIRST_USER_CAT + $USER_DATA['user_id'];
    $url = "index.php?cat=$user_cat";
    pageheader($lang_login_php['login'], "<META http-equiv=\"refresh\" content=\"3;url=$url\">");
    msg_box($lang_login_php['login'], sprintf($lang_login_php['welcome'], $USER_DATA['user_name']), $lang_continue, $url);
} else {
    pageheader($lang_login_php['login'], "<META http-equiv=\"refresh\" content=\"3;url=$referer\">");
    msg_box($lang_login_php['login'], sprintf($lang_login_php['welcome'], $USER_DATA['user_name']), $lang_continue, $referer);
}

Personaly didn't check that , So please reply back for confirmation if this work for you
« Last Edit: September 06, 2006, 11:13:02 am by GauGau »
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: User logging in directly to their their albums (gallery)
« Reply #1 on: September 06, 2006, 11:11:34 am »

Split this posting from the thread that deals with the mod that has been made for cpg1.3.x: User logging in directly to their their albums (gallery)
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.