2018-08-09, 11:34 PM
Hi everyone, I've been working on adding new features to my community's website and one of those features is using your mybb account to login and access a page.
My issue is that the system doesn't seem to even check the account details, and returns the following error on my main forums:
Website: 14aag.com
Login Page (WIP): mods.14aag.com
Forums: forums.14aag.com
PHP Code:
Any help on solving this is greatly appreciated, I'd very much like to sort this out!
Kind Regards,
Flinty
My issue is that the system doesn't seem to even check the account details, and returns the following error on my main forums:
Quote:Authorization code mismatch. Are you accessing this function correctly? Please go back and try again.
Website: 14aag.com
Login Page (WIP): mods.14aag.com
Forums: forums.14aag.com
PHP Code:
<?php
chdir('../forums');
define("IN_MYBB", 1);
require './global.php';
?>
<?php
if($mybb->user['uid'])
{
// The user is logged in, say Hi
echo "Welcome, $mybbuser[username].<br>
You will now be taken to the mods section.";
}
else
{
// The user is not logged in, Display the form
echo "<div class='col s12 m12 l12'>
<h4>Login Form</h4>
</div><form action='http://14aag.com/forums/member.php' method='post'>
<input type='text' name='username' size='25' maxlength='30' placeholder='Username' class='login-field browser-default' /><br />
<input type='password' name='password' size='25' placeholder='Password' class='login-field browser-default' />
<input type='hidden' name='action' value='do_login'>
<input type='hidden' name='url' value='mods.php' /><br>
<center><button type='submit' class='submit' name='submit'><i class='fas fa-lock'></i> Login</button></center>
</form><br>";
}
?>
Any help on solving this is greatly appreciated, I'd very much like to sort this out!
Kind Regards,
Flinty