Just what I was looking for! Thanks!
Here's my login fcn so it may help someone down the road:
function login()
{
if(empty($this->data) == false)
{
if(($user =
$this->User->validateLogin($this->data['User'])) ==
true)
{
//I am saving the user object to the session. Must use the
Session
helper to access in views or controllers
$user = $this->User->findById($user['id']);
$this->Session->write('CurrentUser', $user);
$this->Session->setFlash('You\'ve successfully
logged in.');
$this->redirect('accounts/myconnectnotes');
exit();
}
else
{
$this->Session->setFlash('Sorry, the
information you\'ve entered
is incorrect.');
$this->redirect('failed');
exit();
}
}
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---