mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-30 01:37:17 +00:00
fix: [delete user] remove user from org
This commit is contained in:
parent
ba61d1ae69
commit
6509b5d732
1 changed files with 4 additions and 0 deletions
|
@ -586,6 +586,10 @@ class AILUser(UserMixin):
|
||||||
user_token = self.get_api_key()
|
user_token = self.get_api_key()
|
||||||
if user_token:
|
if user_token:
|
||||||
r_serv_db.hdel('ail:users:tokens', user_token)
|
r_serv_db.hdel('ail:users:tokens', user_token)
|
||||||
|
user_org = self.get_org()
|
||||||
|
if user_org:
|
||||||
|
org = ail_orgs.Organisation(user_org)
|
||||||
|
org.remove_user(self.user_id)
|
||||||
r_serv_db.delete(f'ail:user:metadata:{self.user_id}')
|
r_serv_db.delete(f'ail:user:metadata:{self.user_id}')
|
||||||
r_serv_db.hdel('ail:users:all', self.user_id)
|
r_serv_db.hdel('ail:users:all', self.user_id)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue