UserManager<TUser>.FindByNameAsync(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.
Finds and returns a user, if any, who has the specified user name.
public:
virtual System::Threading::Tasks::Task<TUser> ^ FindByNameAsync(System::String ^ userName);
public virtual System.Threading.Tasks.Task<TUser> FindByNameAsync (string userName);
public virtual System.Threading.Tasks.Task<TUser?> FindByNameAsync (string userName);
abstract member FindByNameAsync : string -> System.Threading.Tasks.Task<'User (requires 'User : null)>
override this.FindByNameAsync : string -> System.Threading.Tasks.Task<'User (requires 'User : null)>
Public Overridable Function FindByNameAsync (userName As String) As Task(Of TUser)
Parameters
- userName
- String
The user name to search for.
Returns
Task<TUser>
The Task that represents the asynchronous operation, containing the user matching the specified userName
if it exists.