Hello Jon Kramme,
One of the tasks is to create and update Sitefinity user accounts via code in a custom user control. For example, when a new person is added to our other database I also need to add that user to Sitefinity and assign them to a particular role.
Inn the other website you have you can use standard ASP.NET methods and classes to maintain Sitefinity's user. First you need to add another membership provider ( you can also add role and profile providers) and then using MembershipUser to create a new user.
Another similar task would be to manage newsletter subscriber group members such that when a user updates opt-out preferences in our other database, we simultaneously add or remove that person from Sitefinity newsletter subscriber groups.
// HERE YOU HAVE ALREADY CREATED A NEW USER FOR THE OTHER MEMBERSHIP PROVIDER
// NOW YOU HAVE TO ACCESS THE SECOND PROVIDER - THIS ONE USED FOR MANAGING SITEFINITY USERS
MembershipUser SitefinityUser = Membership.Providers[
, providerUserKey, MembershipCreateStatus.Success)
For this task you can expose a web service and add Telerik.Notifications and Telerik.Notifications.Data assemblies to non Sitefinity based project( you have also add Telerik.Cms.Engine.dll, telerik.Cms.Web.UI.dll, Telerik.DynamicWebServices.dll, Telerik.Framework.dll, Telerik.Personalization.dll, Telerik.Security.dll, Telerik.Web.UI.dll)
sample code that illustrates adding/removing a given user
DataManager dataManager =
// add user to group
IGroupSubscriber gSubscriber = dataManager.CreateGroupSubscriberRelation(GuidGroupID, subscriber.SubscriberId);
// remove group subscriber relation
IList gSubs = dataManager.GetSubscriberGroupsOfSubscriber(subscriberEmail);
We do not encourage directly working with the datatabse and its store procedures. The database is maintained by Nolics. So, you can use the Sitefinity's API, Nolics api or create custom tables and use LINQ -SQL. You can take a look at our developers manual
for more information and samples with the API
the Telerik team