Merge "AddMembers.apply: Prevent NPE when account doesn't exist" into stable-2.9
This commit is contained in:
@@ -163,7 +163,10 @@ public class AddMembers implements RestModifyView<GroupResource, Input> {
|
|||||||
case LDAP:
|
case LDAP:
|
||||||
if (accountResolver.find(nameOrEmail) == null) {
|
if (accountResolver.find(nameOrEmail) == null) {
|
||||||
// account does not exist, try to create it
|
// account does not exist, try to create it
|
||||||
return createAccountByLdap(nameOrEmail);
|
Account a = createAccountByLdap(nameOrEmail);
|
||||||
|
if (a != null) {
|
||||||
|
return a;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user