I am building a web part to put on Sharepoint My Sites. I need to get the SPUser whose My Site the web part is on. Currently I simply use
Request.QueryString["accountname"]
but this will not work on my own My Site, and I am not sure it will work all the time either.
When
Request.QueryString["accountname"]
is empty the user should be on its own mysite so then you could look inSPContext.Current.Web.CurrentUser
to get the user.