$this->
updateExpiry();
$this->
updateSessionId();
// Reset failed login count
$this->
setFailedLogins(0
);
} elseif ($user) { // If more than 4 previous failed logins lock account for n * failedlogins seconds
if ($user->failedlogins >= 4
) { $lockedUntil =
new Zend_Date();
$lockedUntil->
addSecond($this->lockSeconds *
$user->failedlogins
);
$this->
setLockedUntil($lockedUntil);
} // Increase number of failed logins
$this->
setFailedLogins($user->failedlogins + 1
);
if (isset($lockedUntil)) { return new Zend_Auth_Result( -4,
$this->_identity,
['lockedUntil' =>
$lockedUntil] );
} }