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

fix bug in group mangement

parent 0d3181b6
Branches
No related tags found
No related merge requests found
......@@ -130,7 +130,7 @@ class OC_Group_Database extends OC_Group_Backend {
* removes the user from a group.
*/
public static function removeFromGroup( $uid, $gid ){
$query = OC_DB::prepare( "DELETE FROM `*PREFIX*group_user` WHERE `uid` = ? AND `gid` = ?" );
$query = OC_DB::prepare( "DELETE FROM *PREFIX*group_user WHERE uid = ? AND gid = ?" );
$result = $query->execute( array( $uid, $gid ));
return true;
......
......@@ -184,7 +184,13 @@ $(document).ready(function(){
select.data('username',username);
select.data('userGroups',groups.join(', '));
tr.find('td.groups').empty();
$.each($('#content table').data('groups').split(', '),function(i,group){
var allGroups=$('#content table').data('groups').split(', ');
for(var i=0;i<groups.length;i++){
if(allGroups.indexOf(groups[i])==-1){
allGroups.push(groups[i]);
}
}
$.each(allGroups,function(i,group){
select.append($('<option value="'+group+'">'+group+'</option>'));
});
tr.find('td.groups').append(select);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment