MyBB Community Forums

Full Version: Manually adding password in MySQL query
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to manually add a password using a MySQL such as

$insert_array = array(
				"username" => $db->escape_string($_POST['username']),
				"password" => $password,

with password being something like "password" but when I go to change the users password or I try logging in, it says my password is incorrect. Does MyBB change the password or something? I can't view the raw password data.
Like this:

First you'd need to get the user info, or generate the salt:

$salt = $mybb->generate_salt();
$passtoinsert = md5(md5($password.$salt).$salt);