How to Get List of User/Profile from Membership Provider?

后端 未结 2 1020
遥遥无期
遥遥无期 2020-12-19 15:15

I am utilising this Membership Provider. I am stuck with getting the User List + Profile (FirstName, LastName, Title etc etc)

I know that there is a method for Membe

2条回答
  •  一整个雨季
    2020-12-19 15:32

    First when you create a user, create a profile with the same username using:

    // Create an empty Profile for the new User
    ProfileCommon p = (ProfileCommon) ProfileCommon.Create("username", true);
    

    Then to retrieve it next time..

    // Retrieve a particular profile
    ProfileCommon userProfile = Profile.GetProfile("username");
    

    Thanks.

提交回复
热议问题