[SF6.0] Custom Membership and profiles

Posted by Community Admin on 04-Aug-2018 16:54

[SF6.0] Custom Membership and profiles

All Replies

Posted by Community Admin on 23-May-2013 00:00

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?

Posted by Community Admin on 28-May-2013 00:00

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

Posted by Community Admin on 18-Jun-2013 00:00

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?

Posted by Community Admin on 19-Jun-2013 00:00

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.

Posted by Community Admin on 19-Jun-2013 00:00

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?

Posted by Community Admin on 19-Jun-2013 00:00

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.

Posted by Community Admin on 24-Jun-2013 00:00

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

Posted by Community Admin on 11-Feb-2015 00:00

Could someone please help me to understand why the ApplicationName is important and how does sitefinity CMS use this information?

Posted by Community Admin on 22-Aug-2016 00:00

I've wondered the same thing, Aakash.

This thread is closed