Skip to content
Snippets Groups Projects
Commit 2c99924f authored by Robin Appelman's avatar Robin Appelman
Browse files

make sure the group exists in the backend before adding a user to it

parent ac8bfc21
Branches
No related tags found
No related merge requests found
......@@ -177,7 +177,11 @@ class OC_Group {
if(!$backend->implementsActions(OC_GROUP_BACKEND_ADD_TO_GROUP))
continue;
if($backend->groupExists($gid)){
$succes|=$backend->addToGroup($uid, $gid);
}
}
if($succes){
OC_Hook::emit( "OC_User", "post_addToGroup", array( "uid" => $uid, "gid" => $gid ));
}
return $succes;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment