Alex
-
2/9/2011 6:48:09 AM
Adding admin user to contact list after registration new user
Hello!
I need to add admin user to contact list after registration a new user.
I use code in CustomDataHandler OnAfterInsert
SimpleDataClass dataItemContactList = (SimpleDataClass)dataObj;
if (dataItemContactList.ClassName.ToLower() == "cms.user") { UserInfo user = UserInfoProvider.GetUserInfo("administrator"); if (CMSContext.CurrentUser.IsAuthenticated()) { ContactListInfoProvider.AddToContactList(CMSContext.CurrentUser.UserID, user.UserID); }
But after registration through registration form CurrentUser is shown as "Public", not a new registerred user.
What is wrong?
|