Separate Login

This forum is now closed as part of retiring phpBB2.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
Clarko
Registered User
Posts: 7
Joined: Thu Jan 18, 2007 6:19 pm

Separate Login

Post by Clarko »

Hi All,

Now this will probably sound like a daft question, however...

Some time ago (a little over 2 years now) I created a website which required the forums to be completely hidden from all but it's users. I achieved this by linking the members area to the forums user table and basically you log in with your forum account at which point you can access the forums (and the rest of the members area). If anyone wasn't logged in and tried to go directly to the forums URL they were kicked to the members are login (not the forums login) Unfortunately, I sort of forgot how I did it, and recently my db crashed and I lost all the users, which means I can't log in, but I need to get to the forums to fix things. I know my and my friend played around for a couple of days finding the correct file to add the if( !$userdata['session_logged_in'] ) line to, but I can't for the life of me remember which one it was, nor can I find it.

Obviously the easy choice would be to re-install from scratch, but again, when I came to re-secure everything I would need to know how again.

All I remember is all the members area pages are headed with

Code: Select all

<?php
define('IN_PHPBB', true);
$phpbb_root_path = './forums/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
?>
<?php
if( !$userdata['session_logged_in'] )
   {
	header("Location: http://members.***********.org.uk/index.php");
   }
else
   {
?>
Any idea where I may have done these changes?
Last edited by Clarko on Wed Apr 09, 2008 7:53 pm, edited 1 time in total.
Clarko
Clarko
Registered User
Posts: 7
Joined: Thu Jan 18, 2007 6:19 pm

Re: Separate Login

Post by Clarko »

Nevermind, I found it. It was tucked away in one of the many functions.

I will have to write it down this time.
Post Reply

Return to “[2.0.x] MOD Writers Discussion”