MyBB Community Forums

Full Version: How to authenticate users on a 3rd party by myBB database
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

In this thread, I would like to request a small help about the authentication process.
I want to use myBB database to authenticate the users in an external server.
To clarify, players in the game server must login by their myBB identity only.

The problem is I can get the information from the database, but the password is encrypted.

So I need to decrypt the password to verify the user in the game server.

Can anyone help me with that ?

Thank you.
1) Make sure your file defines the constant IN_MYBB and has the value be 1.
2) Include the global.php of your forum.
3) Include inc/functions_user.php
4) Use the function validate_password_from_username($username, $password)
5) The response will be a boolean false on failure and an array on success.
Thank you.