I am authenticating XenForo user via php.
My code:
public function Auth($username, $password)
{
$userIDA = $this->getarray("SELECT * FROM xf_user WHERE username='".$username."'");
if($userIDA)
{
define('SESSION_BYPASS', false); // if true: logged in user info and sessions...