Target correct user resource
This commit is contained in:
parent
b9983cc5f6
commit
4950f7bebe
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ import java.util.Optional;
|
||||||
public class AccountHelper {
|
public class AccountHelper {
|
||||||
|
|
||||||
private static UserResource getUserResource(RealmResource realm, String username) {
|
private static UserResource getUserResource(RealmResource realm, String username) {
|
||||||
Optional<UserRepresentation> userResult = realm.users().search(username).stream().findFirst();
|
Optional<UserRepresentation> userResult = realm.users().search(username, true).stream().findFirst();
|
||||||
if (userResult.isEmpty()) {
|
if (userResult.isEmpty()) {
|
||||||
throw new RuntimeException("User with username " + username + " not found");
|
throw new RuntimeException("User with username " + username + " not found");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue