changeFullName static method
Future<UserProfileModel>
changeFullName(
- Session session,
- UuidValue authUserId,
- String? newFullName, {
- Transaction? transaction,
Updates a profile's full name.
Implementation
static Future<UserProfileModel> changeFullName(
final Session session,
final UuidValue authUserId,
final String? newFullName, {
final Transaction? transaction,
}) async {
return DatabaseUtil.runInTransactionOrSavepoint(
session.db,
transaction,
(final transaction) async {
final userProfile = await _findUserProfile(
session,
authUserId,
transaction: transaction,
);
userProfile.fullName = newFullName;
final updatedProfile = await _updateProfile(
session,
userProfile,
transaction: transaction,
);
return updatedProfile.toModel();
},
);
}