olada / mybbintegrator Goto Github PK
View Code? Open in Web Editor NEWRepository for the MyBB Integrator
Repository for the MyBB Integrator
I have integrated wordpress to run 'alongside' mybb, had to change a few functions but had it all working perfectly. I only use Wordpress to handle a CMS section of the site so MyBBIntegrator is still being used for what it should be used for.
I had this working perfectly locally. It would login, logout, redirect if user wasn't logged in.
I have since uploaded to my server on a subdomain and cannot get this thing to work for logging in and out, the other calls for recent topics, active threads all work but not log in/out.
I am running:
global $mybb, $lang, $query, $db, $cache, $plugins, $displaygroupfields; require_once './forum/global.php'; require_once 'class.MyBBIntegrator.php'; $MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config);
then my first test to see if the user is logged in is:
<?php if ($MyBBI->isLoggedIn() == false){ header('Location: login'); }?>
but it does nothing, whereas locally it does.
I'm thinking maybe it's a cookie path issue, i've updated my MyBB cookie settings and URL. But really not sure?
Any help is much appreciated
I got this error in my apache error.log:
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function verify_user_password() in /my_web_path/inc/datahandlers/login.php:202\nStack trace:\n#0 /my_web_path/inc/datahandlers/login.php(290): LoginDataHandler->verify_password()\n#1 /my_web_path/inc/3rdparty/class.MyBBIntegrator.php(2129): LoginDataHandler->validate_login()\n#2 /my_web_path/api.php(16): MyBBIntegrator->login('username', 'pass')\n#3 {main}\n thrown in /my_web_path/inc/datahandlers/login.php on line 202\n'
@olada make sure you hook this one to make it auto update https://packagist.org/about#how-to-update-packages
I didn't get createThread to work
It returned blank page
It returned:
You are not logged in
But I was logged in...
I have a strange login issue.
logincount
limit then when i clear that cookie I can no longer login?any ideas why this would be?
I didn't get this to work propperly
It returns:
There are 0 registered users and 1 guests on your site
Registered users:
but I was logged in to myBB
(Excuse me by my English, but I'm Spanish)
I can log in, but when I use getUser() or isLoggedIn() the return is empty (neither true nor false). My mybb version is 1.8.7 and the code is:
<?php
define('IN_MYBB', NULL);
global $mybb, $lang, $query, $db, $cache, $plugins, $displaygroupfields;
require_once '../foro/global.php';
require_once 'class.MyBBIntegrator.php';
$MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config);
?>
<?php
echo ($MyBBI->isLoggedIn()) ? $MyBBI->getUser(0).'<a href="logout.php"> Logout </a>' : '
<form action="../login.php" method="post" id="loginform">
Usuario: <input type="text" name="username" id="username" maxlength="50" size="15"/>
Clave: <input type="password" name="password" id="password" maxlength="50" size="15"/>
<input type="submit" value="Login">
</form>';
?>
And the login.php is:
<?php
define('IN_MYBB', NULL);
global $mybb, $lang, $query, $db, $cache, $plugins, $displaygroupfields;
require_once 'foro/global.php';
require_once 'class.MyBBIntegrator.php';
$MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config);
$login_status = $MyBBI->login($_POST['username'], $_POST['password']);
if ($login_status == true) echo 'Logged in successfully';
else echo 'The login routine failed';
?>
Something wrong? Any problem version?
Thank you very much!
It didn't log me in, still says hello guest
Within this method it tries to delete records from moderators table, but uid column doesn't exists anymore:
$this->db->delete_query("moderators", "uid='{$user_id}'");
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.