Thanks Mariano,
However, i still think that session-valid and session-expire is 2
different things.
My case is like this. I'm using a simple authentication based on cake
session stored in mysql.
When a user log in, a session is assign by a unique username. So, when
an unauthorised
user visit the member's area, the function will redirect to "Access
denied". But when the authorised
user session has expired, i want it to redirect to "Session expired +
Login page"... something like that.
This is my code, and is very stupid, please feel free to comment
function index()
{
if (!$this->Session->valid()) {
$this->redirect('/');
exit;
}
$name = $this->Session->read('Member_name');
$this->_checkAccess($this, $name);
$this->pageTitle = "Adverts List";
$member_id = $this->requestAction("/members/getId/$name");
$this->set('adverts', $this->Advert->findAll(
$conditions = "member_id = $member_id"));
$this->set('posted', $this->Advert->findCount("member_id =
$member_id"));
$this->set('adSpace', $this->adSpace);
$this->set('username', $name);
}
Is there really a workaround / suggestion for my issue here.
thanks for all the replies.
>> CakePHP build the Propshack: http://www.propshack.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---