 |
|
| View previous topic :: View next topic |
| Author |
Message |
BrianTech Private

Joined: 05 Dec 2003 Posts: 2
|
Posted: Sun Dec 07, 2003 2:31 pm Post subject: How to disable registration. |
|
|
| I need to make it so users cant register. How is this possible. I run 6.8. If someone has a link to 7.0 full could I please have it? |
|
| Back to top |
|
 |
|
|
 |
chris President


Joined: 06 Nov 2002 Posts: 1047 Location: Outer Space
|
Posted: Sun Dec 07, 2003 5:08 pm Post subject: |
|
|
In modules/Your_Account/index.php find the lines:
| Code: |
case "new_user":
new_user();
break;
|
Change them to:
| Code: |
case "new_user":
Header("Refresh: 0; url=index.php");
break;
|
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
| Code: |
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 . append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
exit;
}
include("includes/usercp_register.php");
exit;
}
|
and change it to something like:
| Code: |
else if ( $mode == 'editprofile' || $mode == 'register' )
{
Header("Refresh: 0; url=index.php");
exit;
}
|
i.e. we again redirect the user to the index.php page. You get the idea.  |
|
| Back to top |
|
 |
chris-au President

Joined: 16 Aug 2001 Posts: 1842 Location: Australia
|
Posted: Mon Dec 08, 2003 9:31 pm Post subject: |
|
|
It all depends what you want.
You could for instance in admin/modules make the Your_Account for admin only. |
|
| Back to top |
|
 |
sky Private

Joined: 10 Jun 2003 Posts: 2
|
Posted: Fri Aug 06, 2004 12:36 am Post subject: Thanks |
|
|
Chris, thanks for this help. I was able to disable registration on my site in about three minutes without any issues at all thanks to this information. Much appreciated.
-- Sky |
|
| Back to top |
|
 |
cjarrett Private

Joined: 19 Oct 2005 Posts: 1
|
Posted: Wed Oct 19, 2005 7:10 am Post subject: |
|
|
By doing this, anyone who you do want to access the site, has to be made an administrator?
In my case, I am creating a sort of intranet. I want to manage/control who gets access to it. If I do it this way then people have to become admins when they don't need to be.
Is there another suggestion that I could do that may allow me to control who becomes a member of my site? I am using nuke 7.7 |
|
| Back to top |
|
 |
Evaders99 President

Joined: 29 Jul 2003 Posts: 3077
|
Posted: Wed Oct 19, 2005 11:33 am Post subject: |
|
|
| The Approve Membership mod is the best way to control user accounts |
|
| Back to top |
|
 |
ennadrew859 Private

Joined: 24 Oct 2009 Posts: 1
|
Posted: Sat Oct 24, 2009 1:39 am Post subject: |
|
|
| I have made a site for 70-642 practice exam registration and now i would like to disable registration completely for a while to encourage them to go away. What if I moved register.php into my 70-642 practice exam Backup folder? |
|
| Back to top |
|
 |
|
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|