Exemplo n.º 1
0
 public ActionResult HomePage()
 {
     if (Session["UserID"] != null)
     {
         var user = userDetails.GetUser(Session["UserID"].ToString());
         if (user.ProfilePic != null)
         {
             string[] path    = user.ProfilePic.Split('/'); path[6] = "w_400,h_400,c_crop,g_face,r_max/w_200";
             var      newpath = string.Join("/", path);
             Session["ProfilePic"] = newpath;
         }
         Session["Username"] = user.Username;
         string email = (string)TempData["Email"];
         return(View());
     }
     else
     {
         return(RedirectToAction("Index", "Home"));
     }
 }