Author Topic: Directing logo hyperlink to home page after login  (Read 2172 times)

Gukkie

  • Confirmed Member
  • **
  • Posts: 5
  • Karma: +0/-0
Directing logo hyperlink to home page after login
« on: March 08, 2011, 05:47:14 AM »
It seems that after i login, and i click on the website logo on the header, it directs me to index.php still. How do i remove this or change it so it redirects me to the login home page instead?

ripcord

  • Confirmed Member
  • **
  • Posts: 15
  • Karma: +5/-0
    • Designed by Roger
Re: Directing logo hyperlink to home page after login
« Reply #1 on: August 05, 2011, 06:44:02 AM »
Not sure if  this question is still open, but for completness.

This uses the header function to redirect to home.php when index.php is opened with a logged in user.

In /index.php add this statement right before the existing check_login_member('all');

Code: [Select]
if (!empty($_SESSION[_LICENSE_KEY_]['user']['user_id'])) {
     header("LOCATION: home.php");
}

Before:

Code: [Select]
require 'includes/common.inc.php';
require _BASEPATH_.'/includes/user_functions.inc.php';
check_login_member('all');

After:

Code: [Select]
require 'includes/common.inc.php';
require _BASEPATH_.'/includes/user_functions.inc.php';
if (!empty($_SESSION[_LICENSE_KEY_]['user']['user_id'])) {
     header("LOCATION: home.php");
}
check_login_member('all');

Cheers!

PS You would probably need to reinstall this after an official update.