DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Create roles with custom RoleID

You are not authorized to post a reply.
Page 2 of 2 << < 12

Senior Member

    Great code samples, Michael!  

    As Michael pointed out, there are ways to get the information you're looking for.  However, I have a massive concern about your DNN instance.  That is quite old.  If it were me, I'd first focus on upgrading the site to the most current release possible - at least 9.10.02 or 9.11.  If nothing else were a factor, it's primarily due to how much slower and less secure that version is.  You'll be far more stable and productive in both development and everything else if you can manage to get everything upgraded ASAP.  

    It would be a shame if you did all of this work, only to lose it all because some stupid automated bot successfully attacks the site.  :(  

    In regards to better productivity, there's a really useful Event System in newer versions of DNN that could alleviate all of your worries in a single class, and without having to use a Role Provider (potentially), because you'd be able to run code every time a role is created.  

    https://docs.dnncommunity...em/index.html (the role part is not yet documented, but it's there

    Anyhow, if that's not an option right now, let's answer it that way!  ;) 

    If you need a starting point to get your Role Provider started, just follow the source code that Michael pointed out, and only include the Role Provider class(es) necessary.  And you can use UpendoDNN Generator to scaffold the Library project type you'll want to use to get this started.  

    Senior Member

      By the way, I don't know when/if we can get around to it, but I just created an Issue to add a Role Provider template for you and everyone else at some point.  :) 


      You are not authorized to post a reply.
      Page 2 of 2 << < 12

      These Forums are dedicated to the discussion of DNN Platform.

      For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

      1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
      2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
      3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
      4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
      5. No Flaming or Trolling.
      6. No Profanity, Racism, or Prejudice.
      7. Site Moderators have the final word on approving / removing a thread or post or comment.
      8. English language posting only, please.

      Would you like to help us?

      Awesome! Simply post in the forums using the link below and we'll get you started.

      Get Involved