Esempio n. 1
0
        public IActionResult CheckUser()
        {
            string msg;

            try
            {
                var usermodel = _secretSantaBl.CustomUserModelByLoggedInUser(User);
                //Sends the user to see if it is already in our database, or if should be added
                _secretSantaBl.CheckUserByCustomUserAccountNumber(usermodel);
                //return RedirectToAction(nameof(GroupsController.Index), "Groups");
                return(RedirectToAction(nameof(Profile), "Account"));
            }
            catch (AppException ax)
            {
                msg = ax.Message;
            }
            catch (Exception)
            {
                //var error = ex.Message;
                msg = "An Error Has Occured";
            }
            return(PartialView("_ErrorMessage", new StringModel(msg)));
        }