Its simple enough to use Zend\Authentication to authenticate against a DB:
$isAuthenticated = $this->getAuthService($db)->getAdapter()
->setIdentity($this->request->getPost('username'))
->setCredential($this->request->getPost('password'))
->authenticate()
->isValid()
;
But this just returns a Boolean value if authentication was successful. Does Zend\Authentication offer a way to check if the identity is present in a DB and return this info as well? I could just do an sql query first to see if its in the DB, but before I do that I wanted to be sure there wasn't an in box solution the class offered for this.
This way I could have an "Incorrect password please try again" message vs "User account does not exist" . Or I could just say that not displaying this info is a security feature and not bother :P