| java.lang.Object | |
| ↳ | com.google.firebase.auth.UserRecord.UpdateRequest |
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.
| 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 |
setCustomClaims(Map<String, Object> customClaims)
Updates the custom claims associated with this user.
| ||||||||||
| 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 |
setPhoneNumber(String phone)
Updates the phone number associated with this user.
| ||||||||||
| UserRecord.UpdateRequest |
setPhotoUrl(String photoUrl)
Updates the Photo URL of this user.
| ||||||||||
| UserRecord.UpdateRequest |
setProviderToLink(UserProvider providerToLink)
Links this user to the specified provider.
| ||||||||||
| UserRecord.UpdateRequest |
setProvidersToUnlink(Iterable<String> providerIds)
Unlinks this user from the specified providers.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
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).
| uid | a non-null, non-empty user ID string. |
|---|
| IllegalArgumentException | If the user ID is null or empty. |
|---|
Updates the custom claims associated with this user. Calling this method with a null argument removes any custom claims from the user account.
| customClaims | a Map of custom claims or null |
|---|
Enables or disables this user account.
| disabled | a boolean indicating whether this account should be disabled. |
|---|
Updates the display name of this user. Calling this method with a null argument removes the display name attribute from the user account.
| displayName | a display name string or null |
|---|
Updates the email address associated with this user.
| a non-null, non-empty email address to be associated with the user. |
Updates the email verification status of this account.
| emailVerified | a boolean indicating whether the email address has been verified. |
|---|
Updates the password of this user.
| password | a new password string that is at least 6 characters long. |
|---|
Updates the phone number associated with this user. Calling this method with a null argument removes the phone number from the user account.
| phone | a valid phone number string or null. |
|---|
Updates the Photo URL of this user. Calling this method with a null argument removes the photo URL attribute from the user account.
| photoUrl | a valid URL string or null |
|---|
Links this user to the specified provider.
Linking a provider to an existing user account does not invalidate the refresh token of that account. In other words, the existing account continues to be able to access resources, despite not having used the newly linked provider to sign in. If you wish to force the user to authenticate with this new provider, you need to (a) revoke their refresh token (see https://firebase.google.com/docs/auth/admin/manage-sessions#revoke_refresh_tokens), and (b) ensure no other authentication methods are present on this account.
| providerToLink | provider info to be linked to this user\'s account. |
|---|
Unlinks this user from the specified providers.
| providerIds | list of identifiers for the identity providers. |
|---|