UserManager<TUser>.SetUserNameAsync(TUser, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the given userName
for the specified user
.
public:
virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Identity::IdentityResult ^> ^ SetUserNameAsync(TUser user, System::String ^ userName);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> SetUserNameAsync (TUser user, string userName);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> SetUserNameAsync (TUser user, string? userName);
abstract member SetUserNameAsync : 'User * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
override this.SetUserNameAsync : 'User * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
Public Overridable Function SetUserNameAsync (user As TUser, userName As String) As Task(Of IdentityResult)
Parameters
- user
- TUser
The user whose name should be set.
- userName
- String
The user name to set.
Returns
The Task that represents the asynchronous operation.