public async Task<ActionResult> UpdatePicture(string returnUrl)
{
string userEmail = null;
if (Session["TempUserEmailAddress"] != null)
{
userEmail = Library.Helpers.EncryptUtil.Decrypt(Session["TempUserEmailAddress"] as string);
Session.Remove("TempUserEmailAddress");
}
if (!string.IsNullOrWhiteSpace(userEmail) && _regexUtil.IsValidEmail(userEmail))
{
_updateUser.Execute(Authentication.Security.CurrentUserId,
String.Format("/Account/Image?hash={0}", HttpUtility.UrlEncode(Library.Helpers.EncryptUtil.Encrypt(CalculateMD5Hash(userEmail)))));
}
return RedirectToLocal(returnUrl);
}