pub async fn user_exists_for_username(pool: &DBPool, username: String) -> Result<bool> {
        prune_unverified_users(pool).await?;

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

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