Zubrag.com
September 25, 2018, 07:25:23 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Web Page Password Protect to direct each user to an individual page  (Read 1758 times)
radkowboy
Newbie
*
Posts: 1


« on: November 21, 2016, 08:32:37 PM »

Hello,

I am using the password protect script to create 4 users and passwords. I would like to set it up so that each user has an individual page.

Write now my website is using an index.php file. Is there a way for me to direct an individual user to a specific index file each time they log in?

Thank you

Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #1 on: November 22, 2016, 10:36:16 AM »

Find  this     
define('USE_USERNAME', true);

and put this after it on new line

$REDIRECTS = array (
'username1' => 'PATH_TO_PERSONAL_PAGE',
'username2' => 'PATH_TO_PERSONAL_PAGE'
);

above you'll define where each username has to be redirected (username1, username2, etc. replace with your real usernames). PATH_TO_PERSONAL_PAGE - set url for each user.


now find following (question mark and "greater sign") at the end of the password_protect.php   - ?>
and put following code in the line before it
header('Location: '.$REDIRECTS[$login]); exit;
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC