KEYCLOAK-74 SaasServise fix
This commit is contained in:
parent
32779d956a
commit
a6bc0ff447
1 changed files with 2 additions and 23 deletions
|
@ -273,29 +273,8 @@ public class SaasService {
|
||||||
newUser.setUsername(formData.getFirst("username"));
|
newUser.setUsername(formData.getFirst("username"));
|
||||||
newUser.setEmail(formData.getFirst("email"));
|
newUser.setEmail(formData.getFirst("email"));
|
||||||
|
|
||||||
String fullname = formData.getFirst("name");
|
newUser.setFirstName(formData.getFirst("firstName"));
|
||||||
if (fullname != null) {
|
newUser.setLastName(formData.getFirst("lastName"));
|
||||||
StringTokenizer tokenizer = new StringTokenizer(fullname, " ");
|
|
||||||
StringBuffer first = null;
|
|
||||||
String last = "";
|
|
||||||
while (tokenizer.hasMoreTokens()) {
|
|
||||||
String token = tokenizer.nextToken();
|
|
||||||
if (tokenizer.hasMoreTokens()) {
|
|
||||||
if (first == null) {
|
|
||||||
first = new StringBuffer();
|
|
||||||
} else {
|
|
||||||
first.append(" ");
|
|
||||||
}
|
|
||||||
first.append(token);
|
|
||||||
} else {
|
|
||||||
last = token;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (first == null)
|
|
||||||
first = new StringBuffer();
|
|
||||||
newUser.setFirstName(first.toString());
|
|
||||||
newUser.setLastName(last);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requiredCredentialTypes.contains(CredentialRepresentation.PASSWORD)) {
|
if (requiredCredentialTypes.contains(CredentialRepresentation.PASSWORD)) {
|
||||||
newUser.credential(CredentialRepresentation.PASSWORD, formData.getFirst("password"));
|
newUser.credential(CredentialRepresentation.PASSWORD, formData.getFirst("password"));
|
||||||
|
|
Loading…
Reference in a new issue