Also I need to grab username from session. Sessions are set to
database. Cake 1.1.13.
Session data filed is NOT just serilalized. Is there any other way
beside  reg exp?



On Apr 7, 12:22 pm, "jyrgen" <[EMAIL PROTECTED]> wrote:
> i'm still struggling with reading data from the sessions
> table.
>
> at least i'm now able to retrieve session entries, after
> i set up a simple model like this.
>
> class Session extends AppModel{
>         var $name = 'Session';
>         }
>
> but when i try to print out the session data in a controller
>
> $sessions = $this->Session->findAll();
> foreach($sessions as $session){
>         $d=$session['Session']['data'];
>         pr(unserialize($d));
>         }
>
> i get this error:
>
> Notice: unserialize(): Error at offset 0 of 117 bytes in /var/www/cake/
> app/controllers/users_controller.php on line 88
>
> with 117 being the last position "}" of the serialized string
>
> Config|a:3:{s:4:"rand";i:1024300043;s:4:"time";i:1175942427;s:
> 9:"userAgent";s:32:"cc98eaffc23c634e0efd75ab9e36e810";}
>
> thanks for your help!
>
> jyrgen


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to