I’m trying to find a solution to comparing the title of a channel entry to the logged in username. My site has old entries that were placed there using google docs import. Now the site has been updated to have a register page, log-in the whole nine yards, which is awesome. The only problem is some users that will be using the new register log in site already exist. So when the person registers and they have an existing entry they can claim their profile and that profile will be tied to that users account. I have been trying many different ways. The title of the entry is the person’s name. When they log into the site the username is the person’s name. I’m trying to figure out a way to compare the two. I have tried {if {title} == {logged_in_username}}do something{/if} I was looking at using the parameter search, but you can not use the title field, it is only works with custom fields in an entry.
If anyone has any ideas on how to compare the logged_in_username to the title entries of a channel and if they match to send the user to a certain template. Thanks
You could try comparing the logged in member ID with the entry author ID, inside the channel entries tag, something like this:
{exp:channel:entries ...}
{if logged_in_member_id == author_id}
you are the author
{/if}
{if author_id == logged_in_member_id}
you are the author
{/if}
{/exp:channel:entries}Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.