I have installed nForum on an existing site. This site already has members and I want these members depending on their role to be allowed to access and use the forum.
I have tried doing this I have found that the source is looking for properties on the users (that obviously don't exist on my existing members) and I am getting errors.
So my question is is it just a case of adding the properties to all my existing members, if so what do the default values need to be?
Or do the members have to sign up again for the forum?
And if you are going to use your own existing members, then you'll need to grab the source off codeplex. In theory, it should just be as simple as changing the 'ForumUserRoleName' in the Membership helper class to the name of your MemberType/Group Name. Assuming they are the same, if not then you'll probably have to add a seperate property for each and it will need a little more tweaking on the register and login pages which when you open them up is only a couple of lines in the code behind.
Once changed, make sure your members have all the properties a nforum member should have - You can see these in the 'ForumMember' class in the constructor where it maps them across.. And thats it, in 'theory' that 'should' be it and it 'should' just work.
Were you able to use the nforum for your site with existing members ? i am working on an intranet site and i was wondering if i could get it to work using Lee's comments...
I did get it working, but if I remember correctly I had to update the source slightly. I didn't change the forum role name, I just added the forum role to the existing users and added all the properties to the users but I think I found that the properties needed checking and setting in the code as it was throwing a null ref error.
I also turned off the profile pages and other bits within nforum so the users couldnt update themselves too much.
It was a while ago so can't remember exactly, but definitely get the source.
Lee, i have tried using my existing site membership...
using version 1.6 on my 4.8.1 umbraco --
i updated the business logic to use my existing member
public static string ForumUserRoleName
{ get { return "WebsiteUser"; }
}
i added the properties from the forum user to my existing user... but i am getting this errror...
Object reference not set to an instance of an object. at nForum.BusinessLogic.Models.ForumMember..ctor(Nullable`1 memberId) at nForum.BusinessLogic.MembershipHelper.ReturnMember(Nullable`1 memberid) at nForum.BusinessLogic.BaseForumUsercontrol.get_CurrentMember() at nForum.usercontrols.nForum.ForumMainList.HidePrivateCategories(Object sender, RepeaterItemEventArgs e) at System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) at System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) at System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Working with pre-existing site members
Hi
I have installed nForum on an existing site. This site already has members and I want these members depending on their role to be allowed to access and use the forum.
I have tried doing this I have found that the source is looking for properties on the users (that obviously don't exist on my existing members) and I am getting errors.
So my question is is it just a case of adding the properties to all my existing members, if so what do the default values need to be?
Or do the members have to sign up again for the forum?
Bex
This is a good reference for you
http://www.blogfodder.co.uk/2012/1/12/nforum-v15-released
And if you are going to use your own existing members, then you'll need to grab the source off codeplex. In theory, it should just be as simple as changing the 'ForumUserRoleName' in the Membership helper class to the name of your MemberType/Group Name. Assuming they are the same, if not then you'll probably have to add a seperate property for each and it will need a little more tweaking on the register and login pages which when you open them up is only a couple of lines in the code behind.
Once changed, make sure your members have all the properties a nforum member should have - You can see these in the 'ForumMember' class in the constructor where it maps them across.. And thats it, in 'theory' that 'should' be it and it 'should' just work.
Thanks Lee.
That sounds easy enough and pretty much what I was thinking! :)
Hey Bex,
Were you able to use the nforum for your site with existing members ? i am working on an intranet site and i was wondering if i could get it to work using Lee's comments...
-ashwini.
Ashwini
I did get it working, but if I remember correctly I had to update the source slightly.
I didn't change the forum role name, I just added the forum role to the existing users and added all the properties to the users but I think I found that the properties needed checking and setting in the code as it was throwing a null ref error.
I also turned off the profile pages and other bits within nforum so the users couldnt update themselves too much.
It was a while ago so can't remember exactly, but definitely get the source.
Bex
Lee, i have tried using my existing site membership...
using version 1.6 on my 4.8.1 umbraco --
i updated the business logic to use my existing member
i added the properties from the forum user to my existing user... but i am getting this errror...
Object reference not set to an instance of an object.
at nForum.BusinessLogic.Models.ForumMember..ctor(Nullable`1 memberId)
at nForum.BusinessLogic.MembershipHelper.ReturnMember(Nullable`1 memberid)
at nForum.BusinessLogic.BaseForumUsercontrol.get_CurrentMember()
at nForum.usercontrols.nForum.ForumMainList.HidePrivateCategories(Object sender, RepeaterItemEventArgs e)
at System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem)
at System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource)
at System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Any thoughts?
Hmmm seems to be failing to find the current member. I have messaged you on Twitter, add me to Skype and I'll try and help you sort it out.
well, it is because i spell differently than u do - #h5is - LOL authorised vs. authorized -- fixed and all works just wonderfully! Thanks LEE!
is working on a reply...