Hi,
To begin with, please note that i am using Revolution
2.2.4 and MyBB
1.6.8
Does anyone know how to integrate the modx user functions with mybb´s user functions?
Currently i am trying a external login to authenticate a existing user with mybb:
<?php
define("IN_MYBB", NULL);
require_once "/xx/xx/xx/path_to_mybb_forum/global.php";
require_once "/xx/xx/xx/class.MyBBIntegrator.php";
$MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config);
echo ($MyBBI->isLoggedIn()) ? '
MyBBI->isLoggedIn(): You are logged in' : '
MyBBI->isLoggedIn(): You are not logged in';
$username = "username";
$password = "password";
$MyBBI->mybb->input['name']= $username;
$MyBBI->mybb->input['password']= $password;
echo '
Attempting to login';
$login_status = $MyBBI->login($MyBBI->mybb->input['name'], $MyBBI->mybb->input['password']);
echo ($login_status == true ? '
login_status: You are logged in' : 'login_status: You are not logged in');
echo ($MyBBI->isLoggedIn()) ? '
MyBBI->isLoggedIn(): You are logged in' : '
MyBBI->isLoggedIn(): You are not logged in';
?>
I am now asking: What are the correct variables that Modx uses for logins? If i remember right the username variable is
webShortname? or is it
username?
How can i do so that mybb recognizes if my modx user has logged in and vice versa? May i use a prehook for Modx to pass mybb login variables?
[ed. note: bowkilled last edited this post 12 years, 8 months ago.]