zend 4 Zend_Auth
zf create controller authentication
zf create action login authentication
zf create action logout authentication
add to AuthenticationController.php:
private function getAuthAdapter()
{
$authAdapter = new Zend_Auth_Adaptor_DbTable(Zend_Db_Table::getDefaultAdaptor());
$authAdapter->setTableName('users')
->setIdentityColumn('username')
->setCredentialColumn('password');
return $authAdapter;
}
theres also a setCredentialsTreatment for md5 passwords etc
