Group may be null if backend doesn't support creating groups
Signed-off-by: Dries Mys <dries.mys@my-dreams.be>
This commit is contained in:
parent
4a51882793
commit
7a8e4c504b
|
@ -249,6 +249,9 @@ class GroupsController extends AUserData {
|
|||
throw new OCSException('group exists', 102);
|
||||
}
|
||||
$group = $this->groupManager->createGroup($groupid);
|
||||
if ($group === null) {
|
||||
throw new OCSException('Not supported by backend', 103);
|
||||
}
|
||||
if ($displayname !== '') {
|
||||
$group->setDisplayName($displayname);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue