Hello.
I'm looking for some insight and/or guide lines in how to accomplish this.
We have a setup with extranet extended (dw version 19.1.1.0). I have written a custom sign up/Create user module, so the user can select a Language + Store relationship. This is just 2 groups in the extranet ex. “Denmark” à “Aalborg”.
First off I didn’t really think much about it, I just wrote the custom module for this – but now after doing custom validation etc. for creating a user I maybe think it wasn’t the best approach? Anyway, now the user needs the feature where he can select a new store relationship on his Edit profile page. Here I was thinking about developing an ajax feature to populate the html <select> with the stores (groups) in it, who would call a custom aspx page. Then create a notification subscriber that subscribes to UserSaved and then pick up the form value and do my magic.
One problem here, I have created a subscriber. And as far as I understand I should use the new UserManagement notifications when working with the new dynamicweb and extranet extended. Correct?
[Dynamicweb.Extensibility.Subscribe(Dynamicweb.Modules.UserManagement.Notifications.UserSaved)]
public class SaintTropezEditUserExtender : Dynamicweb.Extensibility.NotificationSubscriber
{
public override void OnNotify(string notification, object[] args)
{
HttpContext htc = HttpContext.Current;
htc.Response.Redirect("http://www.google.dk");
}
}
(Cannot find an example http://engage.dynamicweb-cms.com/api/extensibility/ – I think you need to update this.)
But I cannot get this to execute when saving (update user button on edit profile page).
So before starting out I want to know if this approach is what other dw developers would have done or am I totally off track?
Any help, guide lines, best practices, what you would have done I much appreciated.