fix bug in group mangement
This commit is contained in:
parent
0d3181b6d1
commit
9dcf29ff51
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue