The function should work regardless, but perhaps I'm missing something.
Basically, the function "scrapes" values from this page:
M.
Basically, the function "scrapes" values from this page:
/_layouts/userdisp.aspx?Force=True
If you can reach that page, then you should get valid values back. Note the Force=True. This ensures that the userdisp.aspx page loads rather than the My Site information.M.