STEPS TO REPRODUCE 1. System Settings > Users > Create a new user account 2. Kickoff > Leave > Switch User > Log into the new user account 3. Kickoff > Leave > Switch User > Log back into your original user account 4. System Settings > Users > Delete the new user account while it's still logged in OBSERVED RESULT There are no warnings or errors; you can delete the account while it's still logged in! EXPECTED RESULT At the very least, a warning about this. ADDITIONAL INFORMATION If I try to switch user to the still-logged-in-but-not-deleted user account, it fails to accept the password.
I don't see a thing in AccountsService's DBus interface for this, but maybe we could use get enough data about users on the system from the LoginHistory method. It would probably be easier to parse the output of `users` though.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5320