Hello
are you trying to display the element on views other then those of the
views-controller?

if so you need to enable the dauth component in your appcontroller and
apply the few lines of code i posted in comment 50 on this page:
http://bakery.cakephp.org/articles/view/introduction-to-dauth-v0-3



Oscar Burgos wrote:
> Hi:
>
> I´m using dAuth 0.3 for my website.
>
> Authentication is done perfectty but if I want to know the name of the
> user who has logged in called userinfo element from the layout doing
> $this->renderElement('userinfo') i get this messege
>
> Undefined variable: User in ...views\elements\userinfo.thtml on line
> 20
>
> I dig in userinfo.thml and the message reffer to $User variable and in
> the line above there is an advertisement
>
> /* Keep in mind this will only work if you use $userDataInView in the
> component */
>
> I dig more in the component and there is a line like this var
> $userDataInView = array('unset'=>array('password'));
>
> but how must i do this? do i have to declar User variable in the
> AppController?
>
> Thank you.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to