I am using the zend framework2 and make a try to login the user using the DbTableAuthAdapter class of zend framework2 as below
$authAdapter=new DbTableAuthAdapter($dbAdapter,'login_user','username','password','is_active=1');
but instead of this i want to call a procedure like below
$authAdapter=new DbTableAuthAdapter($dbAdapter,'CALL `sp_user_login`(?, ?)');
Is there anyway that i call procedure instead of binding the entity?
OR
Anyone tell me what is wrong in my below code
use Zend\Authentication\Adapter\DbTable as AuthAdapter;
$hashPassword=hash("sha256", $data["password"]);
$subQuery="select zend_with_procedure.login_user.hash_salt from zend_with_procedure.login_user where zend_with_procedure.login_user.username='".$data['username']."'";
$authAdapter=new AuthAdapter($dbAdapter,'login_user','username','password','concat('.$subQuery.','.$hashPassword.') AND is_active=1');
$authAdapter->setIdentity($data['username']);
$authAdapter->setCredential($data['password']);
$auth=new AuthenticationService();
$result=$auth->authenticate($authAdapter);
I am entering the correct username and password the it shows me invalid credentials why, Does anyone have the idea ???