Ejemplo n.º 1
0
        public ActionResult IsLoggedInYet(string id)
        {
            var validatedUser = _nutRepository.IsNutValidated(id);

            if (validatedUser == string.Empty)
            {
                return(Content("false"));
            }

            var user = _userRepository.Retrieve(validatedUser);

            if (user == null)
            {
                return(Content("false"));
            }

            FormsAuthentication.SetAuthCookie(user.Id, false);

            _nutRepository.Delete(id);

            return(Content("true"));
        }