Example:
public async Task<ActionResult> CustomLogin(string name)
{
name = "student@gmail.com";
var user = await UserManager.FindByNameAsync(name);
if (user != null)
{
await SignInManager.SignInAsync(user, true, true);
}
return RedirectToAction("Index", "Student");
}
public async Task<ActionResult> CustomLogin(string name)
{
name = "student@gmail.com";
var user = await UserManager.FindByNameAsync(name);
if (user != null)
{
await SignInManager.SignInAsync(user, true, true);
}
return RedirectToAction("Index", "Student");
}
0 comments:
Post a Comment