zendframework/zf2 — pull request #3371 by albulescu (2013-01-07 19:02:37+00:00)
Title: 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();

PS: REMOVE NEGATION FROM CALLBACK CALL :D