Remove all groups on disable

This commit is contained in:
2011-01-21 00:46:31 +00:00
parent 48dde0dca5
commit b6bec681e1

View File

@@ -74,7 +74,13 @@ class TS3Service(BaseService):
if user:
ret = self.conn.send_command('servergroupdelclient', {'sgid': self.settings['authed_sgid'], 'cldbid': user })
if ret == '0':
groups = self._user_group_list(user)
for group in groups:
self.conn.send_command('servergroupdelclient', {'sgid': groups[group], 'cldbid': user })
return True
return False
def enable_user(self, uid, password):
""" Enable a user by uid """