Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 17, 2012 09:08 AM by Chen Yu - MSFT
Dec 13, 2012 07:08 AM|LINK
How can i get a particular Users UserID on a particular Provider GUID?
MembershipUser newUser = System.Web.Security.Membership.CreateUser(_Email, _Password, _Email, null, null, true, _ApplicationID, out createStatus);
//Get Regsitered User UserID
_UserID = new Guid(Membership.GetUser(newUser).ProviderUserKey.ToString());
How do i enter Povider GUID in get user? I want userid of a user on a specific application name
Dec 13, 2012 07:36 AM|LINK
Dim currentUser As Membershipuser = Membership.GetUser()
Dim currentUserId As Guid = CType(currentUser.ProviderUserKey, Guid)
This might be what you're looking for.
Dec 13, 2012 07:42 AM|LINK
I have multiple providers, How do i get a user on a specific provider? I know the GUID of the provider or the application id, Need to get user id on this particular application id
Dec 17, 2012 09:08 AM|LINK
If you know the specific provider name, you could use below code to get that provider. Then use GerUser() to get the user.
MembershipProvider membershipProvider = Membership.Providers["Name"];