Updated to MyBB 1.8.16 and now trying to login in shows this message
Seems to be affecting all custom themes from what I can see, as the default theme logs in no issues.
Going to try to see what's what but will be hard.
I compared member_login template code
It's this line here doing it.
It needs to be added directly under this line:
Please change your member_login code to this now.
Or just copy the default templates member_ login code to your custom theme.
This also breaks the login on "portal_welcome_guesttext" and isn't fixed even when using the MyBB default template.
Update your "portal_welcome_guesttext" code to this
login Authorization code mismatch. Are you accessing this function correctly? Please go back and try again.
Seems to be affecting all custom themes from what I can see, as the default theme logs in no issues.
Going to try to see what's what but will be hard.
I compared member_login template code
It's this line here doing it.
<input name="my_post_key" type="hidden" value="{$mybb->post_code}" />
It needs to be added directly under this line:
<input type="hidden" name="url" value="{$redirect_url}" />
Please change your member_login code to this now.
Or just copy the default templates member_ login code to your custom theme.
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->login}</title>
{$headerinclude}
</head>
<body>
{$header}
<br />
{$inline_errors}
{$member_loggedin_notice}
<form action="member.php" method="post">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><strong>{$lang->login}</strong></td>
</tr>
<tr>
<td class="trow1"><strong>{$lang->username}</strong></td>
<td class="trow1"><input type="text" class="textbox" name="username" size="25" style="width: 200px;" value="{$username}" /></td>
</tr>
<tr>
<td class="trow2"><strong>{$lang->password}</strong><br /><span class="smalltext">{$lang->pw_note}</span></td>
<td class="trow2"><input type="password" class="textbox" name="password" size="25" style="width: 200px;" value="{$password}" /> (<a href="member.php?action=lostpw">{$lang->lostpw_note}</a>)</td>
</tr>
<tr>
<td class="trow1" colspan="2" align="center"><label title="{$lang->remember_me_desc}"><input type="checkbox" class="checkbox" name="remember" checked="checked" value="yes" /> {$lang->remember_me}</label></td>
</tr>
{$captcha}
</table>
<br />
<div align="center"><input type="submit" class="button" name="submit" value="{$lang->login}" /></div>
<input type="hidden" name="action" value="do_login" />
<input type="hidden" name="url" value="{$redirect_url}" />
<input name="my_post_key" type="hidden" value="{$mybb->post_code}" />
</form>
{$footer}
</body>
</html>
This also breaks the login on "portal_welcome_guesttext" and isn't fixed even when using the MyBB default template.
Update your "portal_welcome_guesttext" code to this
<span class="smalltext">{$lang->guest_welcome_registration}</span><br />
<br />
<form method="post" action="{$mybb->settings['bburl']}/member.php"><input type="hidden" name="action" value="do_login" /><input type="hidden" name="url" value="{$portal_url}" />
{$username}<br /> <input type="text" class="textbox" name="username" value="" /><br /><br />
{$lang->password}<br /> <input type="password" class="textbox" name="password" value="" /><br /><br />
<label title="{$lang->remember_me_desc}"><input type="checkbox" class="checkbox" name="remember" value="yes" /> {$lang->remember_me}</label><br /><br />
<br /><input type="submit" class="button" name="loginsubmit" value="{$lang->login}" /><input name="my_post_key" type="hidden" value="{$mybb->post_code}" /></form>