phpBB

Code Changes

File: phpbb/auth/provider/db.php

  Unmodified   Added   Modified   Removed
Line 87Line 87

$username_clean = utf8_clean_string($username);



$username_clean = utf8_clean_string($username);


		$sql = 'SELECT user_id, username, user_password, user_passchg, user_email, user_type, user_login_attempts

		$sql = 'SELECT *

			FROM ' . USERS_TABLE . "
WHERE username_clean = '" . $this->db->sql_escape($username_clean) . "'";
$result = $this->db->sql_query($sql);

			FROM ' . USERS_TABLE . "
WHERE username_clean = '" . $this->db->sql_escape($username_clean) . "'";
$result = $this->db->sql_query($sql);

Line 123Line 123
				'username_clean'		=> $username_clean,
);
$sql = 'INSERT INTO ' . LOGIN_ATTEMPT_TABLE . $this->db->sql_build_array('INSERT', $attempt_data);

				'username_clean'		=> $username_clean,
);
$sql = 'INSERT INTO ' . LOGIN_ATTEMPT_TABLE . $this->db->sql_build_array('INSERT', $attempt_data);

			$result = $this->db->sql_query($sql);

			$this->db->sql_query($sql);

		}
else
{

		}
else
{

Line 175Line 175
		}

// Check password ...

		}

// Check password ...

		if ($this->passwords_manager->check($password, $row['user_password']))

		if ($this->passwords_manager->check($password, $row['user_password'], $row))

		{
// Check for old password hash...
if ($this->passwords_manager->convert_flag || strlen($row['user_password']) == 32)

		{
// Check for old password hash...
if ($this->passwords_manager->convert_flag || strlen($row['user_password']) == 32)

Line 232Line 232
		// Give status about wrong password...
return array(
'status' => ($show_captcha) ? LOGIN_ERROR_ATTEMPTS : LOGIN_ERROR_PASSWORD,

		// Give status about wrong password...
return array(
'status' => ($show_captcha) ? LOGIN_ERROR_ATTEMPTS : LOGIN_ERROR_PASSWORD,

			'error_msg'		=> ($show_captcha) ? 'LOGIN_ERROR_ATTEMPTS' : 'LOGIN_ERROR_PASSWORD',

			'error_msg'		=> 'LOGIN_ERROR_PASSWORD',

			'user_row'		=> $row,
);
}

			'user_row'		=> $row,
);
}