[Catalyst] Accessing the catalyst user data from a template

John M. Dlugosz wxju46gefd at snkmail.com
Mon Apr 18 01:23:11 GMT 2011


On 4/17/2011 8:14 PM, Adam Jimerson vendion-at-gmail.com |Catalyst/Allow to home| wrote:
> I am trying to display display information about the user currently logged
> into my catalyst app but for some reason it is returning blank (or even
> null).  I am trying to display the uniqid (user id) and username of the
> current user.  From my template I am calling [% c.user.object.username %]
> and [% c.user.object.uniqid %] respectively.  I know that my authentication
> is working because the "$c->user_exists()" calls in my controller is
> passing.
>
>

The first thing I would try is "DUMP"ing the c.user.object to see if it's what you expect. 
  I've had blankness in templates where things were really objects, not strings; or 
perhaps the name is wrong.



More information about the Catalyst mailing list