Deprecated: Function eregi() is deprecated in /www/htdocs/v116052/mainfile.php on line 82

Deprecated: Function set_magic_quotes_runtime() is deprecated in /www/htdocs/v116052/includes/mx_system.php on line 31
HOME Forum
Gallery Your Account



Flash Gallery


How to disable registration

18.6.4. How to disable registration

If you want to make registration of users impossible, you can apply a variation of the solution in Section 18.6.2: you can redirect the users to the main page (index.php) whenever they try to register (e.g. by clicking on some registration link). Note that just by deleting the registration links from the code (see Section 26.5 on how to find them), you still can't prevent a determined user from entering

in the URL box of his browser by hand, thus triggering the "operation new_user" in PHP-Nuke. By this, it becomes clear that a real solution must at least change the behaviour of PHP-Nuke for the value "new_user" of the op URL parameter.

Again, instead of chasing links in the code, there is a more elegant solution:

In modules/Your_Account/index.php find the lines:

case "new_user":

and replace them with with:

case "new_user":
Header("Refresh: 0; url=index.php");

This will only disable registration from the Your Account module (more accurately: it will redirect every registration attempt to the main index.php page).

To disable it in the Forums too, edit modules/Forums/profile.php. Find

else if ( $mode == 'editprofile' || $mode == 'register' )
        if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
                $header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/",
                $_SERVER["SERVER_SOFTWARE"]) ) ? "Refresh: 0; URL=" : "Location: ";
                header($header_location .

and change it to something like:

else if ( $mode == 'editprofile' || $mode == 'register' )
        Header("Refresh: 0; url=index.php");

i.e. we again redirect the user to the index.php page. See also How to disable registration.

Tip It's also possible without programming!

As so often in life, it all depends on what you want. You can of course achieve a similar effect, without any programming, if you make the Your Account module accessible to admins only, from the modules administration, in the administration panel.

If you want users to be registered directly, without confirmation mails, see Section 18.6.5. If you want to approve every user who applied for registration, you can use the Approve Membership module (see Section 8.3.4).

Help us make a better PHP-Nuke HOWTO!

Want to contribute to this HOWTO? Have a suggestion or a solution to a problem that was not treated here? Post your comments on my PHP-Nuke Forum!

Chris Karakas, Maintainer PHP-Nuke HOWTO

  Alle Logos und Warenzeichen auf dieser Seite sind Eigentum der jeweiligen Besitzer und Lizenzhalter.
Im übrigen gilt Haftungsausschluss. Weitere Details finden Sie im Impressum.
Diese Webseite basiert auf pragmaMx 0.1.9, dieses CMS ist frei erhältlich.
wong folkd Linkarena oneview webnews Yigg BlinkList facebook Furl Google Yahoo

Bot-Trap Logo

Seitenerstellung in 0.0557 Sekunden, mit 16 Datenbank-Abfragen
modifiziert für pragmaMx von