so you mean i should do something like that in
profiles_controller?$this->element('user_menu', array('user'=> $user));???2009/7/3 Paul <[email protected]> > > Pass your user to your elements - $this->element('elemtname', > array('somvar' > => somevalue)) > > Also SessionHelper is on hand should you need to toy with session values in > the view > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > Behalf > Of Paulos23 > Sent: Friday, 3 July 2009 11:01 a.m. > To: CakePHP > Subject: get profile id from session > > > Hi peeps, > I have a question about user's profile.In particular i have created > some elements the welcome.ctp and the login.ctp.When user isnt logged > in i show the login and if it is i show thw welcome.Until this point > all work perfect.Now in welcome.ctp i have some links about user's > profile (add,edit,view),and the issue i am facing is that i cant > figure out why i cant use $user['Profile']['id'].i know that in views > i have to do $this->set(compact('user')); but what about elements? > Apart from that i think it's better to get the user's profile id from > session but i don't know if it is possible....e.g $this->Auth->user > ('username')['Profile']['id'] ---->Is right? > > > any help would be nice! > thx > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature > database 4211 (20090702) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature > database 4211 (20090702) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~----------~----~----~----~------~----~------~--~---
