thanks, for your help
I went for this at the end
added this in app_controller beforeFilter:
$this->User->id = $this->Auth->user('id');
if($this->User->admin()){
$this->layout='admin';
}
then in users_controller login:
$this->User->id = $this->Auth->user('id');
if($this->User->admin()){
$this->redirect(array('controller' => 'dashboard', 'action' =>
'index'));
}else{
$this->redirect(array('controller' => 'posts', 'action' =>
'index'));
}
works like a charm!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---