public static class

UserRecord.UpdateRequest

extends Object
java.lang.Object
   ↳ com.google.firebase.auth.UserRecord.UpdateRequest

Class Overview

A class for updating the attributes of an existing user. An instance of this class can be obtained via a UserRecord object, or from a user ID string. Specify the changes to be made in the user account by calling the various setter methods available in this class.

Summary

Public Constructors
UpdateRequest(String uid)
Creates a new UserRecord.UpdateRequest, which can be used to update the attributes of the user identified by the specified user ID.
Public Methods
UserRecord.UpdateRequest setDisabled(boolean disabled)
Enables or disables this user account.
UserRecord.UpdateRequest setDisplayName(String displayName)
Updates the display name of this user.
UserRecord.UpdateRequest setEmail(String email)
Updates the email address associated with this user.
UserRecord.UpdateRequest setEmailVerified(boolean emailVerified)
Updates the email verification status of this account.
UserRecord.UpdateRequest setPassword(String password)
Updates the password of this user.
UserRecord.UpdateRequest setPhotoUrl(String photoUrl)
Updates the Photo URL of this user.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public UpdateRequest (String uid)

Creates a new UserRecord.UpdateRequest, which can be used to update the attributes of the user identified by the specified user ID. This method allows updating attributes of a user account, without first having to call getUser(String).

Parameters
uid a non-null, non-empty user ID string.
Throws
IllegalArgumentException If the user ID is null or empty.

Public Methods

public UserRecord.UpdateRequest setDisabled (boolean disabled)

Enables or disables this user account.

Parameters
disabled a boolean indicating whether this account should be disabled.

public UserRecord.UpdateRequest setDisplayName (String displayName)

Updates the display name of this user. Calling this method with a null argument removes the display name attribute from the user account.

Parameters
displayName a display name string or null

public UserRecord.UpdateRequest setEmail (String email)

Updates the email address associated with this user.

Parameters
email a non-null, non-empty email address to be associated with the user.

public UserRecord.UpdateRequest setEmailVerified (boolean emailVerified)

Updates the email verification status of this account.

Parameters
emailVerified a boolean indicating whether the email address has been verified.

public UserRecord.UpdateRequest setPassword (String password)

Updates the password of this user.

Parameters
password a new password string that is at least 6 characters long.

public UserRecord.UpdateRequest setPhotoUrl (String photoUrl)

Updates the Photo URL of this user. Calling this method with a null argument removes the photo URL attribute from the user account.

Parameters
photoUrl a valid URL string or null