Cannot reach loginkey outside mybb
#1
Hi,

I am using MyBB 1.6.8 with the MyBBIntegrator

I am having issues logging out externally from MyBB, i have no problem at all logging in, i am trying the normal $MyBBI->logout(); function, but it does not work.

function_logout

The logoutkey does not show up outside mybb, in other words, the variable does not exist..

example.com?logoutkey=THE_LOGOUTKEY_OF_THE_USER
You can access the logoutkey with $MyBBI->mybb->user['logoutkey']

This is what i have (logoutkey is blank):
<?php
define('IN_MYBB', NULL);
global $mybb, $lang, $query, $db, $cache, $plugins, $displaygroupfields;
require_once '/xxx/xxx/mybbforum/global.php';
require_once '/xxx/xxx/class.MyBBIntegrator.php';
$MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config);

print $MyBBI->mybb->user['logoutkey'];
?>

Could someone give me a helping hand? I'd be gladful.
Reply
#2
if you print_r($MyBBI->mybb->user) does it show you as logged in and if so, does it list a logoutkey?
Lost interest, sold my sites, will browse here once in a while. It's been fun.
Reply
#3
(2012-07-03, 06:26 PM)pavemen Wrote: if you print_r($MyBBI->mybb->user) does it show you as logged in and if so, does it list a logoutkey?

This is pretty wierd,

I am successfully logged into the forums with the correct user credentials but uid=0 and i do not know why.

Got any clue?
Reply
#4
not without digging into it directly. sorry
Lost interest, sold my sites, will browse here once in a while. It's been fun.
Reply
#5
Ok,

I have changed the following settings:

Cookie domain: (blank)
Cookie path: /

It works now, and my loginkey is shown outside mybb.

Issue is solved.
Reply
#6
I apologize for replying to an old and dead thread but Just want to say thanks @bowkilled you solved my issue Wink
as the system did not work outside of the mybb forum directory.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)