Forum Moderators: coopster

Message Too Old, No Replies

Same Username/Password Across Whole Site?

         

pelican

8:01 pm on Aug 18, 2003 (gmt 0)

10+ Year Member



Could someone tell me if there is anyway to use php to set up your site so that members use the same username and password on multiple places on your site....for example on your message board, on places to submit poetry, places to submit recipes, on a "personals" section (well, my personals section in not intended to be romantic), etc....

I will probably use either phpBB or Invision Board for some areas but others will be using different scripts....I don't want my users to have to register separately for each section of the site.

Oh, and I also want to be able to give them the ability to choose to receive my newsletter when they register.

By the way, although I pretty good at HTML, I am completely new to php....but I have been reading a lot.

Thanks in advance for any and all suggestions :-)

jatar_k

8:16 pm on Aug 18, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You will have to look at what data each application tracks for its members and then unify the members table. You may have to change a lot of sql calls to get the column names the same for each individual application.

I think I would use the BB users/members table as it may have the largest amount of scripts to change if you alter it. You will then have to alter the other scripts to use that table.

vincevincevince

11:16 pm on Aug 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



a solution i used to put (only 2) parts together was to write a function to copy user data between packages and call it at the end of the registration form.

i.e. i keep all information in the tables for each package, and they run as normal, however i've automatically duplicated the registrations.

if you follow me. am not sure if it's the best idea here though, the above post seems to be the most robust way to do it.

olwen

12:14 am on Aug 19, 2003 (gmt 0)

10+ Year Member



Maybe you need portal software like Xoops, Nuke etc

bobnew32

3:24 am on Aug 20, 2003 (gmt 0)

10+ Year Member



Here is a way to validate users in phpbb. You can use it for multiple uses. Also, if you don't want to redirect them if they're not logged in, delete the bottom part that is specific to that. Also, just get your users to sign-up from your phpbb forum and use user_id's for everything.

<?php
// Change this to the full path to your phpBB2 forum
$phpbb_root_path='/home/newbobbo/public_html/forum/';

/*##########################################
## STOP #
## DO NOT MODIFY ANYTHING BELOW THIS LINE #
##########################################*/

define('IN_PHPBB', true);
include($phpbb_root_path.'extension.inc');
include($phpbb_root_path.'common.'.$phpEx);
include($phpbb_root_path.'config.'.$phpEx);

// Retrieve the script path (from board config) where phpBB2 is located relative to the domain name
$sql="SELECT * FROM " . $table_prefix . "config WHERE config_name = 'script_path'";
if (!($result = $db->sql_query($sql)) )
{
die("<B>Error:</B> Could not query script_name information<BR>SQL: $sql");
}

if ($db->sql_numrows($result) == 0)
{
die("<B>Error:</B> script_name information does not exist.<BR>SQL: $sql");
}
$row = $db->sql_fetchrow($result);
$phpbb_script_path = $row[config_value];

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

// If user is not logged in - redirect to the login page with this scriptname as a redirect to...
if(!$userdata['session_logged_in'] )
{
header("Location: " . append_sid($phpbb_script_path . "login." . $phpEx . "?redirect=" . $PHP_SELF));
}

// User is a registered user and have been logged in! - continue..
?>