Reputation: 117
How i can check a password, when i am already authorized on my page? I need write an action, where the user will change a password, and i must check a current his password. When I using a following code:
$this->authAdapter->setIdentity($identity);
$this->authAdapter->setCredential($credential);
if(Zend_Auth::getInstance()->authenticate($this->authAdapter)){...}
then my current session disappears... How i can check password belonging to logged user?
Upvotes: 0
Views: 164
Reputation: 10961
That's the authenticate
method of the Zend_Auth instance is doing two things: checks the credentials are valid and store them. If you only want to check if the credentials are valid, directly call the adapter authenticate
method:
$this->authAdapter->authenticate();
Upvotes: 1