Is there a way to force a deleted user to logout Riot.im?
Is there a way to force a deleted user to logout Riot.im?
What steps did you take to delete the user? You probably did not wipe out their access tokens.
Hello,
I used a script:
./remove_user.sh user
cd /tmp
USER="$1"
SQLCMD="
DELETE FROM users WHERE name='@$USER:myserver.com';
DELETE FROM access_tokens WHERE user_id='@$USER:myserver.com';
DELETE FROM user_ips WHERE user_id='@$USER:myserver.com';
DELETE FROM profiles WHERE user_id='$USER';
DELETE FROM presence_stream WHERE user_id='@$USER:myserver.com';
DELETE FROM devices WHERE user_id='@$USER:myserver.com';
DELETE FROM device_lists_stream WHERE user_id='@$USER:myserver.com';
VACUUM;
"
echo $SQLCMD | sudo -u postgres psql synapse
By the way, how to wipe user access tokens?
DELETE FROM access_tokens WHERE user_id='@$USER:myserver.com'; in the SQLCMD you posted should already do this
After deleting them, did you restart synapse?
restarting synapse does the trick.
Thank you very much for help guys!!!
Much appreciated.
Best Regards,
Pedro Marques