Exemplo n.º 1
0
        public ActionResult UserProfile(string email)
        {
            if (string.IsNullOrEmpty(email))
            {
                return(NotFound());
            }

            if (Context.IsLoggedIn)
            {
                var user = UserService.GetUser(email);
                if (user == null)
                {
                    return(NotFound());
                }

                var model = UserProfileViewModel.Create(user);
                return(View(model));
            }
            else
            {
                return(RedirectToAction("Login"));
            }
        }