Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

UserManagerExtensions Class

Extension methods for IUserManager


Namespace:  Microsoft.AspNet.Identity
Assembly:  Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)

public static class UserManagerExtensions

The UserManagerExtensions type exposes the following members.

Public methodStatic memberAddClaim<TUser>Add a user claim
Public methodStatic memberAddLogin<TUser>Sync extension
Public methodStatic memberAddPassword<TUser>Add a user password only if one does not already exist
Public methodStatic memberAddToRole<TUser>Add a user to a role
Public methodStatic memberChangePassword<TUser>Change a user password
Public methodStatic memberCreate<TUser>(UserManager<TUser>, TUser)Create a user with no password
Public methodStatic memberCreate<TUser>(UserManager<TUser>, TUser, String)Create a user and associates it with the given password (if one is provided)
Public methodStatic memberCreateIdentity<TUser>Creates a ClaimsIdentity representing the user
Public methodStatic memberFind<TUser>(UserManager<TUser>, UserLoginInfo)Sync extension
Public methodStatic memberFind<TUser>(UserManager<TUser>, String, String)Return a user with the specified username and password or null if there is no match.
Public methodStatic memberFindById<TUser>Find a user by id
Public methodStatic memberFindByName<TUser>Find a user by name
Public methodStatic memberGetClaims<TUser>Get a users's claims
Public methodStatic memberGetLogins<TUser>Gets the logins for a user.
Public methodStatic memberGetRoles<TUser>Get a users's roles
Public methodStatic memberHasPassword<TUser>Returns true if a user has a password set
Public methodStatic memberIsInRole<TUser>Returns true if the user is in the specified role
Public methodStatic memberRemoveClaim<TUser>Remove a user claim
Public methodStatic memberRemoveFromRole<TUser>Remove a user from a role.
Public methodStatic memberRemoveLogin<TUser>Remove a user login
Public methodStatic memberRemovePassword<TUser>Associate a login with a user
Public methodStatic memberUpdate<TUser>Update an user
Public methodStatic memberUpdateSecurityStamp<TUser>Generate a new security stamp for a user, used for SignOutEverywhere functionality

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2015 Microsoft