summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/group/database.php2
-rw-r--r--settings/js/users.js8
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/group/database.php b/lib/group/database.php
index f35f61434f0..1afd4b5fe4c 100644
--- a/lib/group/database.php
+++ b/lib/group/database.php
@@ -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;
diff --git a/settings/js/users.js b/settings/js/users.js
index bfc00138e0e..26e7ff24452 100644
--- a/settings/js/users.js
+++ b/settings/js/users.js
@@ -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);