mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Remove all groups on disable
This commit is contained in:
@@ -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 """
|
||||
|
||||
Reference in New Issue
Block a user