pub struct UserProfile {Show 36 fields
pub id: UserId,
pub username: String,
pub email: String,
pub is_oauth: bool,
pub given_name: String,
pub family_name: String,
pub profile_image: Option<ImageId>,
pub language_app: String,
pub language_emails: String,
pub languages_spoken: Vec<String>,
pub opt_into_edu_resources: bool,
pub over_18: bool,
pub timezone: Tz,
pub bio: String,
pub badge: Option<UserBadge>,
pub location_public: bool,
pub organization_public: bool,
pub persona_public: bool,
pub languages_spoken_public: bool,
pub bio_public: bool,
pub circles: Vec<CircleId>,
pub scopes: Vec<UserScope>,
pub created_at: DateTime<Utc>,
pub updated_at: Option<DateTime<Utc>>,
pub organization: Option<String>,
pub persona: Vec<String>,
pub subjects: Vec<SubjectId>,
pub age_ranges: Vec<AgeRangeId>,
pub affiliations: Vec<AffiliationId>,
pub location: Option<Value>,
pub jig_count: u64,
pub resource_count: u64,
pub course_count: u64,
pub playlist_count: u64,
pub total_asset_count: u64,
pub account_summary: Option<UserAccountSummary>,
}Expand description
A user’s profile.
Fields§
§id: UserIdThe user’s id.
username: StringThe user’s username.
email: StringThe user’s email address.
is_oauth: boolIndicator for Oauth email
given_name: StringThe user’s given name (first name)
family_name: StringThe user’s family name (last name)
profile_image: Option<ImageId>ID to the user’s profile image in the user image library.
language_app: StringThe user’s preferred application language.
language_emails: StringThe user’s preferred email language.
languages_spoken: Vec<String>The user’s preferred language.
opt_into_edu_resources: boolDoes the user want educational resources sent to them?
over_18: boolIs the user over 18 years old?
timezone: TzThe user’s timezone.
bio: StringBio for User
badge: Option<UserBadge>Badge of User
location_public: boolAllow location to be public
organization_public: boolAllow organization to be public
persona_public: boolAllow persona to be public
languages_spoken_public: boolAllow languages_spoken to be public
bio_public: boolAllow bio to be public
circles: Vec<CircleId>User associated Circles
scopes: Vec<UserScope>The scopes associated with the user.
created_at: DateTime<Utc>When the user was created.
updated_at: Option<DateTime<Utc>>When the user was last updated.
organization: Option<String>The organization that the user belongs to.
persona: Vec<String>The persona of the user
subjects: Vec<SubjectId>The user’s taught subjects.
age_ranges: Vec<AgeRangeId>The user’s age-ranges.
affiliations: Vec<AffiliationId>The user’s affiliations.
location: Option<Value>The user’s location
jig_count: u64Number of Jigs
resource_count: u64Number of Resources
course_count: u64Number of Courses
playlist_count: u64Number of playlists
total_asset_count: u64Total number of assets
account_summary: Option<UserAccountSummary>The user’s account summary, if available.
Note: This is not set when fetching a user profile. It must be explicitly set using a
function such as [db::account::get_user_account_summary()]
Implementations§
Source§impl UserProfile
impl UserProfile
Sourcepub fn school_or_organization(&self) -> Option<&str>
pub fn school_or_organization(&self) -> Option<&str>
Returns the school or organization associated with this user if any.
Source§impl UserProfile
impl UserProfile
Sourcepub fn display_name(&self) -> String
pub fn display_name(&self) -> String
Returns the display name for UI purposes
Trait Implementations§
Source§impl Clone for UserProfile
impl Clone for UserProfile
Source§fn clone(&self) -> UserProfile
fn clone(&self) -> UserProfile
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more