mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 08:38:28 +00:00
fix: [user] fix user delete #163
This commit is contained in:
parent
f3946cc4f3
commit
b38819fdaa
1 changed files with 2 additions and 1 deletions
|
@ -156,6 +156,7 @@ def delete_user(user_id):
|
|||
for role_id in get_all_roles():
|
||||
r_serv_db.srem(f'ail:users:role:{role_id}', user_id)
|
||||
user_token = get_user_token(user_id)
|
||||
if user_token:
|
||||
r_serv_db.hdel('ail:users:tokens', user_token)
|
||||
r_serv_db.delete(f'ail:user:metadata:{user_id}')
|
||||
r_serv_db.hdel('ail:users:all', user_id)
|
||||
|
|
Loading…
Reference in a new issue