예제 #1
0
        public IActionResult CompleteRegistration()
        {
            var registration = new UserAccountViewModel();

            registration.Init(_db);
            var current_User = _userManager.GetUserAsync(HttpContext.User).Result;

            registration.CurrentUser.FirstName = current_User.FirstName;
            registration.CurrentUser.LastName  = current_User.LastName;
            registration.CurrentUser.Email     = current_User.Email;
            return(View(registration));
        }
예제 #2
0
        public IActionResult Index()
        {
            UserAccountViewModel uavm = new UserAccountViewModel();

            uavm.Init(_db);
            var usrId = User.Claims.First().Value;

            if (_db.Person.Any(c => c.UserId == usrId))
            {
                uavm.GetCurrentUserInfo(usrId);
                return(View(uavm));
            }
            else
            {
                return(View(uavm));
            }
        }