Share via


UserManager<TUser>.SetPhoneNumberAsync(TUser, String) Method

Definition

Sets the phone number for the specified user.

public:
 virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Identity::IdentityResult ^> ^ SetPhoneNumberAsync(TUser user, System::String ^ phoneNumber);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> SetPhoneNumberAsync (TUser user, string phoneNumber);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> SetPhoneNumberAsync (TUser user, string? phoneNumber);
abstract member SetPhoneNumberAsync : 'User * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
override this.SetPhoneNumberAsync : 'User * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
Public Overridable Function SetPhoneNumberAsync (user As TUser, phoneNumber As String) As Task(Of IdentityResult)

Parameters

user
TUser

The user whose phone number to set.

phoneNumber
String

The phone number to set.

Returns

The Task that represents the asynchronous operation, containing the IdentityResult of the operation.

Applies to