Ban a live user: flag the row, revoke every session, and tombstone the identity.
The tombstone means the ban survives even if the user later deletes their account. Return
whether a user was there to ban.
- Parameters:
- conn
psycopg.Connection An open accounts-database connection.
- user_id
int The user to ban.
- reason
str, optional A free-text ban reason, kept on the row and the tombstone. Default None.