Reputation: 170
I am using zf2 authentication service where in credential treatment i want to send several messages to user by checking some conditions as following:-
I am checking these fields in where condition of getDbSelect as
$authAdapter = new AuthAdapter($DbAdapter,
'admin',
'username',
'password',
"MD5(CONCAT('$salt', ?,'passhash'))"
);
$authAdapter->setIdentity($authform_data['username'])->setCredential($authform_data['password']);
$auth = new AuthenticationService();
$select = $authAdapter->getDbSelect();
$select->where('status = 1 AND email_confirmed = 1 AND phone_confirmed = 1');
$result = $auth->authenticate($authAdapter);
print_r($result);die;
It only gives this message "A record with the supplied identity could not be found" if anyone of them is false but doesn't specify which field is true and which one is false . Is there any solution through which i could check these conditions individually and pass messages respectively. Thanks in Advance.
Upvotes: 0
Views: 302