mirror of
https://git.teknik.io/Teknikode/Teknik.git
synced 2023-08-02 14:16:22 +02:00
Added updating of Last Seen on login
This commit is contained in:
parent
54398fbe29
commit
b5c02f7640
@ -110,6 +110,9 @@ namespace Teknik.IdentityServer.Controllers
|
|||||||
|
|
||||||
if (result.Succeeded)
|
if (result.Succeeded)
|
||||||
{
|
{
|
||||||
|
foundUser.LastSeen = DateTime.Now;
|
||||||
|
await _userManager.UpdateAsync(foundUser);
|
||||||
|
|
||||||
// make sure the returnUrl is still valid, and if so redirect back to authorize endpoint or a local page
|
// make sure the returnUrl is still valid, and if so redirect back to authorize endpoint or a local page
|
||||||
if (_interaction.IsValidReturnUrl(returnUrl) || Url.IsLocalUrl(returnUrl))
|
if (_interaction.IsValidReturnUrl(returnUrl) || Url.IsLocalUrl(returnUrl))
|
||||||
{
|
{
|
||||||
@ -179,6 +182,9 @@ namespace Teknik.IdentityServer.Controllers
|
|||||||
|
|
||||||
if (result.Succeeded)
|
if (result.Succeeded)
|
||||||
{
|
{
|
||||||
|
user.LastSeen = DateTime.Now;
|
||||||
|
await _userManager.UpdateAsync(user);
|
||||||
|
|
||||||
return RedirectToLocal(returnUrl);
|
return RedirectToLocal(returnUrl);
|
||||||
}
|
}
|
||||||
else if (result.IsLockedOut)
|
else if (result.IsLockedOut)
|
||||||
|
Loading…
Reference in New Issue
Block a user