i am trying to find out how to search the cms database for a specific users username based on their user id and not based on logged in.
Any documentation links or advice would be great, have tried using various ways but ultimately i think query is the way but i am unsure of how to find a specific users username.
i have tried this but i need to do this using the ee() classes in some way as i cannoe seem to define a php variable with the following :
{exp:query sql="SELECT screen_name FROM exp_members WHERE member_id = '1' "}
{screen_name}
{/exp:query}
please advise and many thanks!