Jump to:

1036 Posts in 810 Topics by 315 members

Forum Module

SilverStripe Forums » Forum Module » Disable User Registration

Discuss the Forum Module.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1434 Views
  • kylehudson00
    Avatar
    Community Member
    22 Posts

    Disable User Registration Link to this post

    Hi all, using the forum module for the first time and I have a question. Is it possible to disable the user registration function? For this particular site, users will be created manually from the back-end, so I would like to remove/hide the registration feature. Is this possible? I'd still like users to be able to edit their forum profiles, if they're logged in.

  • Willr
    Avatar
    Forum Moderator
    5503 Posts

    Re: Disable User Registration Link to this post

    Without editing any of the core files you could either:

    * Create a director rule to redirect ForumMemberProfile/register to something like a 404 page (you could put this in your _config.php). Wiki has info about rules.
    * Override the ForumMemberProfile_register.ss template into your theme and remove the $Form and have some comment explaining why people can't register.

  • zard
    Avatar
    Community Member
    23 Posts

    Re: Disable User Registration Link to this post

    Is that a secure solution? If a user actually hand-crafted the POST data, would both of the solutions reject them? My understanding is that only the first tip would actually prevent from registration.

  • Willr
    Avatar
    Forum Moderator
    5503 Posts

    Re: Disable User Registration Link to this post

    AFAIK SS would reject hand crafted POST data due to the SecurityToken being required for that form.

  • Mackodlak
    Avatar
    Community Member
    95 Posts

    Re: Disable User Registration Link to this post

    Could you explain a bit further the part of how can I use redirect in _config.php to disable member registration?
    I like the way it sounds, but I couldn't find how to set the director rule in _config.php
    So plz give me a link to what I need or just the code I have to save in _config.php

    thank you all!

  • jonm80
    Avatar
    Community Member
    10 Posts

    Re: Disable User Registration Link to this post

    mysite _config.php

    look at this code

    Director::addRules(1, array(
       'ForumMemberProfile/register ' => 'registrationsdisabledmessagepage',
    ));

    you might have to out in in forums/_config.php not sure

    1434 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.