changeFullName static method
Updates a users name, returns null if unsuccessful.
Implementation
static Future<UserInfo?> changeFullName(
Session session,
int userId,
String newFullName,
) async {
var userInfo = await findUserByUserId(session, userId, useCache: false);
if (userInfo == null) return null;
userInfo.fullName = newFullName;
await UserInfo.db.updateRow(session, userInfo);
if (AuthConfig.current.onUserUpdated != null) {
await AuthConfig.current.onUserUpdated!(session, userInfo);
}
await invalidateCacheForUser(session, userId);
return userInfo;
}