yasuki_core.accounts.users#

Functions

ban_user(conn, user_id[, reason])

Ban a live user: flag the row, revoke every session, and tombstone the identity.

delete_account(conn, user_id)

Erase a user (GDPR right to erasure), cascading their sessions and decks.

get_user(conn, user_id)

Return the user with user_id, or None if absent.

list_users(conn)

Return every account for the admin dashboard, newest first.

set_approved(conn, user_id, approved)

Set a user's approval flag, returning whether a user was there to update.

set_avatar(conn, user_id, avatar)

Set (or clear, with None) a user's avatar spec, returning the refreshed row, or None if absent.

set_display_name(conn, user_id, display_name)

Update a user's display name, returning the refreshed row, or None if no such user.

set_role(conn, user_id, role)

Set a user's role, returning whether a user was there to update.

unban_user(conn, user_id)

Lift a ban: clear the row's flag and reason and drop the identity's tombstone.

upsert_user(conn, google_sub, email, ...)

Insert the user for a Google sub, or refresh the existing one, and return it.