updateUser method
Updates an existing user.
Set displayName
, photoUrl
and/or phoneNumber
to the empty string to
remove them from the user record. When phone number is removed, also the
corresponding provider will be removed.
Implementation
Future<UserRecord> updateUser(
String uid, {
bool? disabled,
String? displayName,
String? email,
bool? emailVerified,
String? password,
String? phoneNumber,
String? photoUrl,
}) async {
uid = await _authRequestHandler.updateExistingAccount(
uid,
CreateEditAccountRequest(
disabled: disabled,
displayName: displayName,
email: email,
emailVerified: emailVerified,
password: password,
phoneNumber: phoneNumber,
photoUrl: photoUrl,
uid: uid));
// Return the corresponding user record.
return await getUser(uid);
}