MyBB Community Forums

Full Version: Users can't login
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I thought that the member_login template under the Members Template sector was the one that supposed to have that line added in.

Or does the header_welcomeblock_guest template also need that line added in as well?

It's a bit confusing now.
(2018-07-05, 10:02 PM)Serpius Wrote: [ -> ]I thought that the member_login template under the Members Template sector was the one that supposed to have that line added in.

Or does the header_welcomeblock_guest template also need that line added in as well?

Yes, there are many places with a login form and the <input name="my_post_key"... field needs to be inserted there.
Afer some tests I found that updating the  header_welcomeblock_guest template with
<input name="my_post_key" type="hidden" value="{$mybb->post_code}" />
did not make the error to dissapear in the mobile version.

So, it works for my Square theme in Desktop version but doesn't work for GoMobile (I recive the same error)
Here is the code from   header_welcomeblock_guest template (Templates/MyBB Go Mobile / header)

Error after login: "Authorization code mismatch. Are you accessing this function correctly? Please go back and try again.  "
(2018-07-06, 09:50 AM)Lyvyoo Wrote: [ -> ]Afer some tests I found that updating the  header_welcomeblock_guest template with
<input name="my_post_key" type="hidden" value="{$mybb->post_code}" />
did not make the error to dissapear in the mobile version.

So, it works for my Square theme in Desktop version but doesn't work for GoMobile (I recive the same error)
Here is the code from   header_welcomeblock_guest template (Templates/MyBB Go Mobile / header)

Error after login: "Authorization code mismatch. Are you accessing this function correctly? Please go back and try again.  "
It's dependent on the theme. Try and export your theme out into an XML file, and just do a search for do_login. Identify the template with the do_login forms, and then add that new line in.

You have to do this for every theme.. i.e. you have to add this new line to both Square and Go Mobile.
Thanks,
What software do you reccomand to use for open the XML file and identify the template with do_login forms?
(2018-07-06, 08:57 PM)Lyvyoo Wrote: [ -> ]Thanks,
What software do you reccomand to use for open the XML file and identify the template with do_login forms?

If you're using Windows, Notepad++ is generally a half decent option.
(2018-07-06, 08:57 PM)Lyvyoo Wrote: [ -> ]Thanks,
What software do you reccomand to use for open the XML file and identify the template with do_login forms?

What Euan T said. I actually export the XML, use Notepad++ to edit the file, and then reimport it back.

If you're unfamiliar with XML in general, you can open the XML file with your favourite browser (Chrome or Firefox). Look at the attached pic below. The browser will organise the XML nicely. You can then search for the text do_login, identify the template it's in, and use the MyBB theme editor in ACP to edit the original theme directly.

Regardless the method, always export the XML file, and do backups so that if you accidentally made a mistake, you have the original version to fallback to.


[attachment=40568]
Thanks for all your support!
I will update to 1817 and see if the error is still there, in order to do the XML trick
If you use a custom theme, you have to apply all changes manually. If you use MyBB default theme, you can use find updated templates option in ACP. This can be closed.
Pages: 1 2