Thank you all
I got the answer from irc.
Metasan said that the data is empty on filed login_type_id and user_id
(because it came from the form thtml), so I have to use the $resuls
variable not the data, this is my new code:
$this->Session->write('user',$this->data['Login']['username']);
$this->Session->write('usertype',$results['Login']['login_type_id']);
$this->Session->write('user_id',$results['Login']['login_type_id']);
$level=$this->Session->read('usertype');
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---