Update src/main/java/de/scimeda/keycloak/events/logging/LastLoginEventListenerProvider.java
This commit is contained in:
parent
b0671c4d4c
commit
44aa04c7ea
|
@ -39,9 +39,9 @@ public class LastLoginEventListenerProvider implements EventListenerProvider {
|
|||
|
||||
Map<String, List<String>> userAttrs = user.getAttributes();
|
||||
if (userAttrs.containsKey("last-login")) {
|
||||
String userLastLogin = userAttrs.get("last-login").get(0);
|
||||
List<String> userLastLogin = userAttrs.get("last-login");
|
||||
if (userLastLogin != null && !userLastLogin.isEmpty()) {
|
||||
user.setSingleAttribute("prior-login", userLastLogin);
|
||||
user.setSingleAttribute("prior-login", userLastLogin.get(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,4 +62,4 @@ public class LastLoginEventListenerProvider implements EventListenerProvider {
|
|||
// Nothing to close
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue