NPE if trying to update user with no attributes
This commit is contained in:
parent
1262ab70c8
commit
9e73592381
1 changed files with 4 additions and 2 deletions
|
@ -67,8 +67,10 @@ public class UsersResource {
|
|||
user.setEmail(rep.getEmail());
|
||||
user.setFirstName(rep.getFirstName());
|
||||
user.setLastName(rep.getLastName());
|
||||
for (Map.Entry<String, String> attr : rep.getAttributes().entrySet()) {
|
||||
user.setAttribute(attr.getKey(), attr.getValue());
|
||||
if (rep.getAttributes() != null) {
|
||||
for (Map.Entry<String, String> attr : rep.getAttributes().entrySet()) {
|
||||
user.setAttribute(attr.getKey(), attr.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue