| ApplicationUserStoreTUserSetUserNameAsync Method  | 
            Sets the given userName for the specified user.
            
 
Namespace: Kentico.MembershipAssembly: Kentico.Membership (in Kentico.Membership.dll) Version: 13.0.131
Syntaxpublic Task SetUserNameAsync(
	TUser user,
	string userName,
	CancellationToken cancellationToken
)
Parameters
- user
 - Type: TUser
The user whose name should be set. - userName
 - Type: SystemString
The user name to set. - cancellationToken
 - Type: System.ThreadingCancellationToken
The CancellationToken used to propagate notifications that the operation should be canceled. 
Return Value
Type: 
Task
            The 
Task that represents the asynchronous operation.
            
Implements
IUserStore.SetUserNameAsync(UTP, String, CancellationToken)
Exceptions| Exception | Condition | 
|---|
| ArgumentNullException | user is null. | 
See Also