Beispiel #1
0
 public ActionResult Login(LoginModel login)
 {
     if (AccountService.IsUser(login) && AccountService.IsLoggedIn(login))
     {
         // loggen in
         var _signIn = new SignInService();
         _signIn.IdentitySignin(AccountService.User(login.Email));
         OcelotLog.AuditLogs($"{Constant.GetUserID()} at {DateTime.Now} signed in.", "AccountCOntroller", "Login");
         return(RedirectToAction("../Vendor/Index"));
     }
     else
     {
         @TempData["LOGIN"]   = "******";
         @TempData["message"] = "Invalid email or password";
         @TempData["email"]   = login.Email;
         OcelotLog.ErrorLogs($"{login.Email} at {DateTime.Now} attempted signed in.", "AccountCOntroller", "Login");
         return(RedirectToAction("Index"));
     }
 }