So if first_name is not in the session what is
[first_name]=>Brian
in the array that I dump to the screen? Am I looking at that wrong?
It's in the array why can't I get to it?
FULL ARRAY:
Array ( [Config] => Array ( [userAgent] =>
cbc2e74d1e45abcccfdc85ca016f6426 [time] => 1194988565 [rand] =>
1309992527 ) [User] => Array ( [id] => 1 [username] => brehg
[password] => DEB8ABLE [email] => [EMAIL PROTECTED]
first_name]=>Brian [last_name] => Rehg ) )
On Nov 13, 5:13 pm, francky06l <[EMAIL PROTECTED]> wrote:
> Seems first_name is not in yoursessionbut $this->Session-
>
> >read('User.username') must be in.
>
> On Nov 13, 11:28 pm, Brian <[EMAIL PROTECTED]> wrote:
>
>
>
> > From within my controller if I print the entiresession:
> > $this->Session->read()
> > It returns:
> > Array ( [Config] => Array ( [userAgent] =>
> > cbc2e74d1e45abcccfdc85ca016f6426 [time] => 1194988565 [rand] =>
> > 1309992527 ) [User] => Array ( [id] => 1 [username] => brehg
> > [password] => DEB8ABLE [email] => [EMAIL PROTECTED] [first_name]
> > =>
> > Brian [last_name] => Rehg ) )
>
> > If I try try to print the last_name:
>
> > $first_name = $this->Session->read('User.first_name');
> > echo "FIRST NAME: " . $first_name;
>
> > echo "FIRST NAME: " . $this->Session->read("User.first_name");
>
> > print_r($this->Session->read('User.first_name'));
>
> > they all return nothing.
>
> > On Nov 13, 4:06 pm, "Christopher E. Franklin, Sr."
>
> > <[EMAIL PROTECTED]> wrote:
> > > Whoops! I was wrong, you can access it via
> > > $this->Session->read('User.first_name'); because the read function uses
> > > Set::extract
>
> > > to get the value out.
>
> > > On Nov 13, 1:05 pm, Brian <[EMAIL PROTECTED]> wrote:
>
> > > > >From within my controller if I print the entiresession:
>
> > > > $this->Session->read()
> > > > It returns:
> > > > Array ( [Config] => Array ( [userAgent] =>
> > > > cbc2e74d1e45abcccfdc85ca016f6426 [time] => 1194988565 [rand] =>
> > > > 1309992527 ) [User] => Array ( [id] => 1 [username] => brehg
> > > > [password] => DEB8ABLE [email] => [EMAIL PROTECTED] [first_name] =>
> > > > Brian [last_name] => Rehg ) )
>
> > > > If I try to print an element within the array:
> > > > $this->Session->read('first_name');
> > > > returns:
> > > > nothing
>
> > > > What am i doing wrong- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---