Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bex 444 posts 555 karma points
    Feb 28, 2012 @ 17:07
    Bex
    0

    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

  • Lee 1130 posts 3088 karma points
    Feb 28, 2012 @ 19:25
    Lee
    0

    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.

     

  • Bex 444 posts 555 karma points
    Feb 29, 2012 @ 09:42
    Bex
    0

    Thanks Lee.

    That sounds easy enough and pretty much what I was thinking! :)

  • ashwini 43 posts 63 karma points
    Jun 07, 2012 @ 19:15
    ashwini
    0

    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.

  • Bex 444 posts 555 karma points
    Jun 08, 2012 @ 09:24
    Bex
    0

    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

     

     

  • bob baty-barr 1180 posts 1294 karma points MVP
    Nov 05, 2012 @ 21:07
    bob baty-barr
    0

    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)

    Any thoughts?

  • Lee 1130 posts 3088 karma points
    Nov 06, 2012 @ 06:56
    Lee
    1

    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.

  • bob baty-barr 1180 posts 1294 karma points MVP
    Nov 08, 2012 @ 16:36
    bob baty-barr
    0

    well, it is because i spell differently than u do - #h5is - LOL authorised vs. authorized -- fixed and all works just wonderfully! Thanks LEE!

Please Sign in or register to post replies

Write your reply to:

Draft