+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / [SF6.0] Custom Membership and profiles

[SF6.0] Custom Membership and profiles

9 posts, 0 answered
  1. Che
    Che avatar
    4 posts
    Registered:
    27 Mar 2011
    23 May 2013
    Link to this post
    I've implemented custom membership and role providers for my existing user tables shared with other applications, descending from MembershipDataProvider and RoleDataProvider.  Now that I can see all my users and their roles, I find that the users do not have names in the administration list, and I cannot edit their roles in the SiteFinity profile because they do not have an email address in their profile, and names and emails from the MembershipDataProvider are not used.  My users are imported and maintained in the other system, but I want to be able to give some of the administrative users Sitefinity roles without manually maintaining profiles in two places.  
    I haven't seen anywhere that a custom profile provider is supported, so how can I make this work?  Do I have to synchronize data between my other database and Sitefinity?  Is there a reasonably easy way to make a job to update Sitefinity profiles from another source?

  2. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    19 Sep 2016
    28 May 2013
    Link to this post
    Hi Che,

    We have addressed simialr request in the support ticket you have submitted on the issue, you can find our response there. For your convenience I'm pasting ti below as well:

    1. In the user list, users from our custom provider show up with email/name column as "User not found".  Is there a reasonable way that we can get profile information from our existing data?  The forums seemed to indicate that a custom Profile Provider is not possible yet, so what is the suggested way to update and sync profiles between Sitefinity and another system? (users are imported into that other system from other sources, so it would be a fair amount of work to redo the import process)

    As you properly pointed out, the DisplayName parameter from the users List control is taken from the userprofile (it's a concatenation of the user's FirstName and LastName profile fields). The rest (Username, Email, CreationDate, and LastLoginDate) are pulled directly from the user's properties. A possible reason for the UserNotFound exception is that the provider is nto returnign a user with this ID, or the Email/UserName properties of the User object you're returning to Sitefinity are not set.
    Regarding the UserProfile data, you can rely on the out of the box Profile provider implementation - once you edit your users that are pulled through custom MembershipProvider, Sitefinity will create profile entries for these users.


    Regards,
    Boyan Barnev
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Josh
    Josh avatar
    16 posts
    Registered:
    15 May 2012
    18 Jun 2013 in reply to Boyan Barnev
    Link to this post
    I am interested in getting a little more detail on this issue as well. Is there any way to pull profile information (first/last names, email addresses) from the database we're using for our custom MembershipProvider?
  4. Che
    Che avatar
    4 posts
    Registered:
    27 Mar 2011
    19 Jun 2013 in reply to Josh
    Link to this post
    Hi Josh, when I got the membership provider working correctly, especially making sure that the ApplicationName was unique and consistent for the data from my providers, Sitefinity happily imported the basic member information into its profiles.  I think I still have some issues because I used a micro-orm instead of OpenAccess, and the design seems to expect the members and roles to be cached, but it essentially works.  I can see names and emails, and assign CMS roles to my existing members and so forth.
  5. Josh
    Josh avatar
    16 posts
    Registered:
    15 May 2012
    19 Jun 2013
    Link to this post
    Thanks Che, I'll keep that in mind about the ApplicationName.

    I've got a membership provider pulling in usernames and email addresses, but I am having trouble figuring out how or where to pull in profile items like first and last names. Can anyone from the Sitefinity team shed some light on this please?
  6. Josh
    Josh avatar
    16 posts
    Registered:
    15 May 2012
    19 Jun 2013
    Link to this post
    Thanks Che, I'll keep that in mind about the ApplicationName. I've got a membership provider pulling in usernames and emails, but I am having trouble figuring out how or where to pull in profile items like first and last names. Can anyone from the Sitefinity team shed some light on this please?

    Edit: sorry about the double post, I kept getting an error about invalid post content and must have clicked the post button twice.
  7. Jen Peleva
    Jen Peleva avatar
    568 posts
    Registered:
    10 Sep 2016
    24 Jun 2013
    Link to this post
    Hello Josh,

    You can try to create a custom provider that inherits from SitefinityProfileProvider and register it in Sitefinity. With it you'll be able to handle the logic for getting profile information from the custom database.


    Regards,
    Jen Peleva
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Aakash
    Aakash avatar
    2 posts
    Registered:
    19 Jan 2015
    11 Feb 2015 in reply to Che
    Link to this post
    Could someone please help me to understand why the ApplicationName is important and how does sitefinity CMS use this information?
  9. Sam
    Sam avatar
    16 posts
    Registered:
    28 Jul 2010
    22 Aug in reply to Aakash
    Link to this post
    I've wondered the same thing, Aakash.
9 posts, 0 answered