findUserProfileByUserId static method
Future<UserProfileModel>
findUserProfileByUserId(
- Session session,
- UuidValue authUserId, {
- Transaction? transaction,
Find a user profile by the AuthUser
's ID.
Throws a UserProfileNotFoundException in case no profile exists for the given authUserId
.
Implementation
static Future<UserProfileModel> findUserProfileByUserId(
final Session session,
final UuidValue authUserId, {
final Transaction? transaction,
}) async {
final profile = await maybeFindUserProfileByUserId(
session,
authUserId,
transaction: transaction,
);
if (profile == null) {
throw UserProfileNotFoundException(authUserId);
}
return profile;
}