UserInfo class abstract
Information about a user. The UserInfo should only be shared with the user itself as it may contain sensitive information, such as the users email. If you need to share a user's info with other users, use the UserInfoPublic instead. You can retrieve a UserInfoPublic through the toPublic() method.
- Available extensions
Constructors
Properties
- blocked ↔ bool
-
True if the user is blocked from signing in.
getter/setter pair
- created ↔ DateTime
-
The time when this user was created.
getter/setter pair
- email ↔ String?
-
The email of the user.
getter/setter pair
- fullName ↔ String?
-
The full name of the user.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ int?
-
The id column of the row. Can be null if this row is not yet stored in
the database.
getter/setter pair
- imageUrl ↔ String?
-
A URL to the user's avatar.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scopeNames
↔ List<
String> -
List of scopes that this user can access.
getter/setter pair
-
scopes
→ Set<
Scope> -
Available on UserInfo, provided by the UserInfoMethods extension
Returns a set containing the scopes this user has access to.no setter -
table
→ Table<
int?> -
The table that this row belongs to.
no setter
- userIdentifier ↔ String
-
Unique identifier of the user, may contain different information depending
on how the user was created.
getter/setter pair
- userName ↔ String?
-
The first name of the user or the user's nickname.
getter/setter pair
Methods
-
changeFullName(
Session session, String newUserName) → Future< bool> -
Available on UserInfo, provided by the UserInfoMethods extension
Updates the full name of this user, returns true if successful. -
changeUserName(
Session session, String newUserName) → Future< bool> -
Available on UserInfo, provided by the UserInfoMethods extension
Updates the name of this user, returns true if successful. -
copyWith(
{int? id, String? userIdentifier, String? userName, String? fullName, String? email, DateTime? created, String? imageUrl, List< String> ? scopeNames, bool? blocked}) → UserInfo - Returns a shallow copy of this UserInfo with some or all fields replaced by the given arguments.
-
invalidateCache(
Session session) → Future< void> -
Available on UserInfo, provided by the UserInfoMethods extension
Invalidates the local cache for the user, and forces next lookup to get a fresh copy from the database. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Returns a serialized JSON structure of the model which also includes fields used by the database.
-
toJsonForProtocol(
) → Map< String, dynamic> - Returns a JSON structure of the model, optimized for Protocol communication.
-
toPublic(
{bool includeUserId = true, bool includeFullName = true}) → UserInfoPublic -
Available on UserInfo, provided by the UserInfoExtension extension
Returns an object with only the information that can safely be shared publicly for the user. -
toString(
) → String -
A string representation of this object.
override
-
updateScopes(
Session session, Set< Scope> newScopes) → Future<bool> -
Available on UserInfo, provided by the UserInfoMethods extension
Updates the scopes for a user, returns true if successful.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- t → UserInfoTable
-
final
Static Methods
-
include(
) → UserInfoInclude -
includeList(
{WhereExpressionBuilder< UserInfoTable> ? where, int? limit, int? offset, OrderByBuilder<UserInfoTable> ? orderBy, bool orderDescending = false, OrderByListBuilder<UserInfoTable> ? orderByList, UserInfoInclude? include}) → UserInfoIncludeList
Constants
- db → const UserInfoRepository