User logging in directly to their their albums (gallery) User logging in directly to their their albums (gallery)
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

User logging in directly to their their albums (gallery)

Started by Sami, September 06, 2006, 09:33:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sami

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


$sql =  "SELECT user_id, user_name, user_password FROM {$this->usertable} WHERE ";


with


$sql =  "SELECT user_id, user_group, user_name, user_password FROM {$this->usertable} WHERE ";


- Edit login.php lines 39 & 40 and
replace


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


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
‍I don't answer to PM with support question
Please post your issue to related board

Joachim Müller

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)