kentico_helenag
-
10/17/2008 1:38:20 PM
RE:Having new members automatically subscribed to newsletters
Hello,
Thank you for your message.
You could modify the code of RegistrationFrom web part (/CMSWebParts/Membership/RegistrationForm.ascx). Please see here how to modify the code of standard web parts: http://devnet.kentico.com/docs/devguide/modifying_the_design_of_standa.htm
You could add one checkbox with a label, for example.
In the code behind you would find the btnOK_Click method and after setting a user (about line 498), you could add your functionality. It would check the checkbox and if it would be checked it would add a new subscriber.
You could use our API – the API Reference could be found here: http://devnet.kentico.com/downloads/kenticocms_api.zip
You could create a new subcriber with the same info as user (name, e-mail...). Then you would use his new SubscriberId in CMS.Newsletter.SubscriberProvider.AddSubscription method. Please see to our API Reference. The NewsletterId could be found directly in your database (table Newsletter_Newsletter) or you could use again API to find out it.
Best Regards,
Helena Grulichova Support Engineer
|