Пример #1
0
        public ActionResult ChangePassword(ChangePass chPass)//,string id)
        {
            bool isChanged       = false;
            var  findUserByEmail = _usersRepository.GetUserByEmail(chPass.Email);

            if (findUserByEmail != null)
            {
                SendEmail email = new SendEmail();
                email.ChangePasswordEmail(findUserByEmail.Email, findUserByEmail.UniqueCode.ToString());
                ViewBag.Message = "Wysłano, sprawdź swoja skrytkę pocztową";
                isChanged       = true;
            }
            else
            {
                ViewBag.Message = "Podany email jest nieprawidłowy";
            }

            ViewBag.IsChanged = isChanged;
            return(View());
        }