Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

Current User compared to Post User

Quote Reply
Current User compared to Post User
I'm trying to display some information on each post that will only be visible to the person who made the post. I'm working with current_user_username and post_username. When I simply print them on each post:

<%current_user_username%> <%post_username%>

... I get the output I'm expecting. My username on each post followed by the name of the user who made the post.

When I try to compare them using:

<%if current_user_username eq post_username%> This is your post! <%endif%>

...then I get this showing up on all posts. I'd expect it to show up on posts made by me only. I've also tried == and =

Any suggestions?

Safe swoops
Sangiro
Quote Reply
Re: [sangiro] Current User compared to Post User In reply to
Try
Code:
<%if current_user_username eq $post_username%>

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Current User compared to Post User In reply to
Yup - that works of course! It's almost painful when I think about the amount of time I've spent staring at this without that registering! Blush

Thanks.

Safe swoops
Sangiro