lib/controllers/auth.php:
<?php
class onrAuthController extends ezcMvcController
{
public function doLoginRequired()
{
$res = new ezcMvcResult;
$res->variables['redirUrl'] = $this->redirUrl;
$err = array(
'ezcAuthenticationDatabaseFilter' => array(
ezcAuthenticationHtpasswdFilter::STATUS_USERNAME_INCORRECT => 'Incorrect or no credentials provided.',
ezcAuthenticationHtpasswdFilter::STATUS_PASSWORD_INCORRECT => 'Incorrect or no credentials provided.'
),
'ezcAuthenticationSession' => array(
ezcAuthenticationSession::STATUS_EMPTY => 'No session',
ezcAuthenticationSession::STATUS_EXPIRED => 'Session expired'
),
'logout' => array(
1 => 'You logged out',
)
);
$reasonText = array();
$reasons = $this->reasons;
foreach ( $reasons as $line )
{
list( $key, $value ) = each( $line );
$reasonText[] = $err[$key][$value];
}
$res->variables['reasons'] = $reasonText;
$res->variables['redirUrl'] = $this->redirUrl;
return $res;
}
}
?>