Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deactivating a user will keep the account status online #27187

Closed
pauloriply opened this issue Nov 4, 2022 · 8 comments
Closed

Deactivating a user will keep the account status online #27187

pauloriply opened this issue Nov 4, 2022 · 8 comments

Comments

@pauloriply
Copy link

At first time we had two instance installation with separetaed DB on DigitalOcean.
After we found out about that multiple installation became only for EE, we have just removed one instance.
It behaves strangely after we delete one of two instance.
We authorize our users over Active Directory.

Description:

When an employee is fired, we go to AD and lock him there.
After that we go to RC admin panel and lock him there, but if user has been online he has still online status. It's wrong.

Steps to reproduce:

1 - User now online
2 - User is activated
3 - Go to admin panel -> users
4 - Select user
5 - Click on -> "Deactivate user"

Expected behavior:

Set offline status for user, that has diactivated

Actual behavior:

After user has diactivated status still online

Server Setup Information:

  • Version of Rocket.Chat Server: 5.3.0
  • Operating System: ubuntu 20.04
  • Deployment Method: tar
  • Number of Running Instances: 1
  • DB Replicaset Oplog: yes
  • NodeJS Version: v14.19.3
  • MongoDB Version: 5.0.8 / wiredTiger (oplog Enabled)

No logs in debug mode.

@maluhub
Copy link

maluhub commented Nov 4, 2022

@pauloriply This seems related to: #27145, because we are facing your behaviour too.
could you check if you are facing it too?
The other issue we found is that autoaway doesn't work.
Strange thing is that we have 12 accounts. 3 of them are working well, the rest is affected.

@pauloriply
Copy link
Author

pauloriply commented Nov 4, 2022

@maluhub maluhub
Confirm.
Not all account has affected by this behaviour but lot of them.
Some accounts, after disabling changed status.

@maluhub
Copy link

maluhub commented Nov 4, 2022

@pauloriply We've manged to solve this issue by clearing usersSessions collection in mongoDB. Login to ssh and do the following:

rocketchat-server.mongo
use parties  
db.usersSessions.deleteMany({})  

@maluhub
Copy link

maluhub commented Nov 4, 2022

Additionally you can clear current status of all online users by executing:

db.users.updateMany({status:"online"},{$set:{status:"offline"}})

@pauloriply
Copy link
Author

Still in 5.4.0

@Corinari
Copy link

does also still occur in 5.4.1

@bognerf
Copy link

bognerf commented Feb 7, 2023

And in 5.4.2

@sampaiodiego
Copy link
Member

sampaiodiego commented Feb 16, 2024

this is fixed in recent versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants