yasuki_core.accounts.users.set_avatar#

set_avatar(conn, user_id, avatar)[source]#

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

Parameters:
connpsycopg.Connection

An open accounts-database connection.

user_idint

The user to update.

avatardict or None

The avatar spec {card_id, image_path, crop} to store as JSON, or None to clear it.