2009/7/3 Paul <subs@webprogression.co.nz>
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
__________ Information from ESET NOD32 Antivirus, version of virus signature
-----Original Message-----
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] 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
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 cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment