Flexible Content Management System


Hack for NewUser module permission

Contributed by on Dec 17, 2001 - 12:11 PM

So here is my hack for allowing site administrator to enable/disable user registration via the new permission system.

First I modify the user.php under NS-NewUser module with the following:

if (!(authorised(0, 'NewUser::', '::', ACCESS_READ))) {

include 'header.php';


include 'footer.php';



Then I modify the global.php under the module lang eng directory by adding:

define("_REGISTERNOAUTH","Sorry this site does not accept user registration at this moment. Please contact site administrator for requesting user account.");

By default, this is enable. If you want to disable the user registration, just simply add a group permission rule: All Realm, Unregistered,NewUser::,.*,None

Make this rule sequence right after the All realms,Unregistered,Menublock::,Main Menu:(My Account|Logout|Submit News):,None

Then you are set to go. Hope this will help some of the corporate users and may be this can be merged into the core release in the future.