| Author |
Post |
|
|
#1 Sun Feb 18, 2007 6:39 pm
|
|
Member
Registered: Jan 2007
Posts: 3
Location: Netherland
|
Hi there, I really like usebb it so simple fast and clean, this kind of a forum i was looking for a long time, and i found usebb and iam in love with it. But my problem now is, i want to intergrate it to my site so my members dont need to re-login when going to the forums. Is there any documentation or anything else that explains how to do it. Regards, Znabty « Last edit by Dietrich on Wed Jun 27, 2007 12:27 pm. »
|
|
|
#2 Sun Feb 18, 2007 6:58 pm
|
|
Developer
Registered: Apr 2004
Posts: 2230
Location: Belgium
|
There is no documentation and UseBB 1 was not planned to support this. I guess when setting the cookie path to / and using PHP's session functionality, you could access a few of the functionality, however user data is not stored in $_SESSION but in the database.
This kind of customization will be possible with UseBB 2.
|
|
|
#3 Sun Feb 18, 2007 7:17 pm
|
|
Member
Registered: Jan 2007
Posts: 3
Location: Netherland
|
Wich sessions does the login give $_SESSION['username'] etc ??
|
|
|
#4 Sun Feb 18, 2007 7:40 pm
|
|
Developer
Registered: Apr 2004
Posts: 2230
Location: Belgium
|
None, you need to use the database and request the user ID from usebb_sessions, along with a join on usebb_members to get the username.
|
|
|
#5 Thu Mar 01, 2007 7:41 pm
|
|
Member
Registered: Aug 2006
Posts: 42
Location: The Netherlands
|
I've been busy with a wrapper which I'll release in a while. It supports accessing functions, language files, sessions, authentication and things like that, currently.
|
|
|
#6 Fri Mar 09, 2007 8:28 pm
|
|
Member
Registered: Feb 2007
Posts: 10
Location: London, England
|
I certainly be interested in any developments along these lines. I'd really like my users to be able to log in once from my home page and then not have to log into UseBB seperately. Indeed as my site grows there are several add ons that need seperate logins. Maybe there is a niche out there for an open source "user management" application that could be hooked to home pages and integrate with other apps such as USeBB, Gallery software and so on. I've seen one or two programs (Gallery managers actually since that was what I was looking for) that claim to be able to access some BB user data but it was always phpbb or nuke etc. A wrapper that could accept logins and then create sessions for other supported applications would be very usefull (if all the developers out there were willing to include support for it :-)
Mark.
|
|
|
#7 Mon Mar 19, 2007 10:26 am
|
|
Member
Registered: Mar 2007
Posts: 2
|
I'm incorporating the useBB system into another application.
I want users to be logged into useBB automatically. Are there a couple of session variables I can set that will do this...
Thanks
|
|
|
#8 Mon Mar 19, 2007 12:54 pm
|
|
Member
Registered: May 2005
Posts: 386
Location: US WA. St.
|
|
|
|
#9 Mon Mar 19, 2007 4:27 pm
|
|
Developer
Registered: Apr 2004
Posts: 2230
Location: Belgium
|
Topics merged, please search before you post.
|
|
|
#10 Wed Jun 06, 2007 9:27 am
|
|
Member
Registered: Mar 2007
Posts: 2
|
Just looking into this again.
I created a form which submit onload to login which works ok, but I would rather use the sessions stored in the database.
I can see sess_id is encrypted but what is it encrypting, an auto increment number?
|
|
|
#11 Wed Jun 06, 2007 11:58 am
|
|
Developer
Registered: Apr 2004
Posts: 2230
Location: Belgium
|
Session ID's are random generated as always in PHP.
|
|
|
#12 Sun Jun 17, 2007 10:43 am
|
|
Member
Registered: Aug 2006
Posts: 42
Location: The Netherlands
|
Here's my wrapper file. Feel free to use it, and if you got any usefull fixes/addons, please post them here  <?php if(!defined('INCLUDED')){ die('You\'re not permitted to view this file directly'); } define('PORTAL_ROOT', './'); // Portal root path define('ROOT_PATH', './forum/'); // Forum root path require(ROOT_PATH.'sources/common.php'); // Include forum engine set_magic_quotes_runtime(0); // Do NOT change the location of this line! require(PORTAL_ROOT.'sources/engine/common.php'); // Include portal engine $lang = $functions->fetch_language(); // Language fetching $session->update(); // Update session if(isset($session)){ // Check if the session variable exists if($session->sess_info['user_info']['level'] == 0){ $sess = array(); // Create a new array $sess['id'] = 0; // Set user id to zero $sess['name'] = $lang['Guest']; // Set user name to "Guest" $sess['displayed_name'] = $lang['Guest']; // Set displayed name to "Guest", too $sess = array_merge($sess, $session->sess_info['user_info']); // Merge the array we've created with the session array } else{ // We're not dealing with a guest user, so the session variable should be all filled $sess1 = $session->sess_info['user_info']; // Set the session variable so we can access user info $sess2 = array(); // Make a array if(!isset($sess1['displayed_name'])){ // If we don't have set a displayed name... $sess2['displayed_name'] = $sess1['name']; // then fill that key with the user name } else{ $sess2['displayed_name'] = $session->sess_info['user_info']['displayed_name'];// Else use the displayed name } $sess = array_merge($sess2, $sess1); // Merge the arrays } } ?>
|