changeFullName method

Future<bool> changeFullName(
  1. Session session,
  2. String newUserName
)

Updates the full name of this user, returns true if successful.

Implementation

Future<bool> changeFullName(
  Session session,
  String newUserName,
) async {
  var userId = id;
  if (userId == null) return false;

  var updatedUser = await Users.changeFullName(session, userId, newUserName);
  if (updatedUser == null) return false;

  userName = newUserName;
  return true;
}