Re: Sessions not writing whole string

2009-01-23 Thread RoVo

Hi gkc,

 I am writing the user role to the the session with
 $this-Session-write('User.role',$this-$dbuser['User']
 ['role']).
Are you sure, that ,$this-$dbuser['User']['role'] is a string?

Try like this:
$this-Session-write('User.role', (string)$this-$dbuser['User']
['role']);

Hope that helps
RoVo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Sessions not writing whole string

2009-01-22 Thread gkc

As part of my login query, I am writing the user role to the the
session with $this-Session-write('User.role',$this-$dbuser['User']
['role']).

However, when I call the $this-Session-read('User.role'), it is only
returning the first character of the role.

If I place the whole result in the session like this $this-Session-
write('User.role',$this-$dbuser['User']) then I can access the
proper information, however I do not want to store all of that with
the session.

Can anyone tell me what is going on?

Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---