protected void LoadProfileInfo() { using (UnitOfWork unifOfWork = new UnitOfWork()) { Usuario usuario = this.GetUsuario(unifOfWork.Context); this.Session["Gravatar"] = MD5Hash.Calculate(usuario.Email.Trim().ToLower()).ToLower(); this.Session["Usuario"] = usuario.UserName; this.Session["Nome"] = usuario.Nome; this.Session["Sobrenome"] = usuario.Sobrenome; this.Session["NomeSobrenome"] = usuario.Nome + " " + usuario.Sobrenome; this.Session["DataNascimento"] = usuario.DataNascimento; this.Session["LoadedProfile"] = true; } }
/** * Returns the md5 hash for this object. */ public string GetMD5Hash() { return(MD5Hash.Calculate(this.Write())); }