I’m trying to create a widget to display stuff about the user who’s profile is being viewed. e.g.
Andys profile page (viewed by steven)
Andy has made 10 posts on our forum
So I want Andy’s user id rather than the viewer (steven’s) id
Hope this is clear 😀
Currently i’m using the current url and preg matching the hell out of it to get the users unique username but I was hoping that there might be a more elegant solution
thanks,
Andy
You can do the following;
This will return a user object of the current user that is being viewed