Example #1
0
        public ActionResult Register(RegisterViewModel model)
        {
            if (ModelState.IsValid)
            {
                BusinessLayerResult <NotlaGelUser> res = NotlaGelUserManager.RegisterUser(model);

                if (res.Errors.Count > 0)
                {
                    res.Errors.ForEach(x => ModelState.AddModelError("", x.Message));
                    return(View(model));
                }

                OkViewModal notifyobj = new OkViewModal()
                {
                    Title          = "Kayıt Başarılı",
                    RedirectingUrl = "/Home/Login",
                };
                notifyobj.Items.Add("Lütfen e-posta adresinize gönderdiğimiz aktivasyon link'ine tıklayarak hesabınızı aktive ediniz.Hesabınızı aktive etmeden not ekleyemez ve beğenme yapamazsınız.");
                return(View("Ok", notifyobj));
            }
            //Kullanıcı username kontrolü
            return(View(model));
        }
Example #2
0
        public ActionResult UserActivate(Guid id)
        {
            BusinessLayerResult <NotlaGelUser> res = NotlaGelUserManager.ActivateUser(id);

            if (res.Errors.Count > 0)
            {
                ErrorViewModal errorNotifyObj = new ErrorViewModal()
                {
                    Title = "Geçersiz İşlem",
                    Items = res.Errors
                };

                return(View("Error", errorNotifyObj));
            }
            OkViewModal okNotifyObj = new OkViewModal()
            {
                Title          = "Hesap Aktifleştirildi",
                RedirectingUrl = "/Home/Login",
            };

            okNotifyObj.Items.Add("Hesabınız Aktifleştirildi. Artık not paylaşabilirsiniz.");

            return(View("Ok", okNotifyObj));
        }