Function wicrs_server::api::user_banned[][src]

pub async fn user_banned(user: &User, hub_id: &ID, user_id: &ID) -> Result<bool>

Checks if a user is banned from a hub. Returns true if they are and false if they aren’t.

Arguments

  • user - The user who is checking.
  • hub_id - The hub in which to check the ban status.
  • user_id - The user whose ban status is to be checked.

Errors

This function may return an error for any of the following reasons:

  • The user who is checking is not in the hub.
  • The hub could not be loaded for any of the reasons outlined by Hub::load.