Custom password checker for database adapter

$auth = new AuthenticationService();
$authAdapter = new DbTable( $this->services->get('db') );

$authAdapter->setPasswordChecker(function($dbpass, $userpass){
	$bcrypt = new Bcrypt();
	return $bcrypt->verify($userpass, $dbpass);
});

$authAdapter->setTableName("users");
$authAdapter->setIdentityColumn($this->emailAuth ? "email":"username");
$authAdapter->setCredentialColumn("password");
$authAdapter->setIdentity($username);
$authAdapter->setCredential($password);
$auth->setAdapter($authAdapter);
$result = $auth->authenticate();