pub async fn user_exists(pool: &DBPool, user_id: i32) -> Result<bool> {
        prune_unverified_users(pool).await?;

        let res = generic_service_err!(
            sqlx::query_file_as!(User, "sql/user/get_user.sql", user_id)
            .fetch_all(pool).await,
            "Failed to check if user exists");

        Ok(res.len() == 1)
    }
/// Returns whether or not a user exists
/// 
/// # Arguments
/// 
/// * `pool` - The database pool
/// * `user_id` - The ID of the user
Returns whether or not a user exists
Returns whether or not a user exists
pub async fn user_exists(pool: &DBPool, user_id: i32) -> Result<bool> {
        prune_unverified_users(pool).await?;
        let res = generic_service_err!(
            sqlx::query_file_as!(User, "sql/user/get_user.sql", user_id)
            .fetch_all(pool).await,
            "Failed to check if user exists");
        Ok(res.len() == 1)
    }
pub async fn user_exists ( pool : & DBPool , user_id : i32 ) -> Result < bool > { prune_unverified_users ( pool ) . await ? ; let res = generic_service_err ! ( sqlx query_file_as ( User " " user_id ) fetch_all ( pool ) await " " ) ; Ok ( res . len ( ) == 1 ) }
Returns whether or not a user exists
Returns whether or not a user exists
pool
&DBPool
user_id
i32
pool
&DBPool
user_id
i32