views:

230

answers:

1

Hi,

I'm a first time authlogic implementer and everything has gone smoothly, until now. I want to display the username of the person currently logged in, beside "logout" and "edit profile" links, both of which work fine.

I can't figure out how to do it though. Any help is much appreciated.

Thanks.

+2  A: 
<% if current_user %>
   <%=h current_user.username %>
<% end %>
ghoppe
I could've sworn I tried that, obviuosly not though, as it worked a charm. Thanks
Hinchy
This assumes that the current_user method is defined somewhere. Check the example app to see how that method is implemented: http://github.com/binarylogic/authlogic_example
Ben