pub async fn get_outstanding_user_email_code(
conn: &mut PgConnection,
user_id: Uuid,
purpose: UserEmailCodePurpose,
) -> ModelResult<Option<UserEmailCode>>Expand description
The user’s outstanding code for purpose, whether or not it has expired.
Use this to tell a timed out code apart from one that was never requested, spent or retired;
get_unused_user_email_code_with_user_id returns nothing for all of those.