Over a million developers have joined DZone.

Check IPB User Credientials With PHP

DZone's Guide to

Check IPB User Credientials With PHP

· ·
Free Resource
I was recently writing a script that needed to interact log users in only if they had registered on an IPB 3 forum, and I couldn't find any tips on how to go about it. You may have to edit the table in the query if you have a table prefix.

function userLoginIpb($user, $password) {
	$query = mysql_query("SELECT `members_pass_salt`, `members_pass_hash`
			      FROM `members`
			      WHERE `name` = '$user'");
	$results = mysql_fetch_assoc($query);
	$password = md5(md5($results['members_pass_salt']).md5($password));
		if($password == $results['members_pass_hash']) {
			return true;
			else {
				return false;


if(userLoginIpb($username, $password)) {
	echo 'logged in';

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}