Fix for User null from IP address "::1" has logged out (#14322)
(cherry picked from commit dd59ef17f5)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
b716e98780
commit
aa4a1b3498
@@ -624,7 +624,7 @@ public class AuthenticationController : UmbracoApiControllerBase
|
||||
await _signInManager.SignOutAsync();
|
||||
|
||||
_logger.LogInformation("User {UserName} from IP address {RemoteIpAddress} has logged out",
|
||||
User.Identity == null ? "UNKNOWN" : User.Identity.Name, HttpContext.Connection.RemoteIpAddress);
|
||||
result.Principal.Identity == null ? "UNKNOWN" : result.Principal.Identity.Name, HttpContext.Connection.RemoteIpAddress);
|
||||
|
||||
var userId = result.Principal.Identity?.GetUserId();
|
||||
SignOutSuccessResult args = _userManager.NotifyLogoutSuccess(User, userId);
|
||||
|
||||
Reference in New Issue
Block a user