01/04/2013 by Nitesh

How to Disable User Registrations in Drupal 6


We all face the issue of spam registrations on our websites. Many of the times, we want to disable user registrations on the website. This post details how the same can be done in Drupal. Drupal allows the following different settings for user registrations –

  • Only site administrators can create new user accounts.
  • Visitors can create accounts and no administrator approval is required.
  • Visitors can create accounts but administrator approval is required.

By default, Drupal comes with the setting “Visitors can create accounts and no administrator approval is required.” so that users can register and are auto approved. To disable user registrations, we need to perform the following steps (I take the site example as http://www.yoursite.com) –

  1. Login to admin section of your website at http://www.yoursite.com/admin
  2. Go to User Management > User Settings (Alternately, you can go to http://www.yoursite.com/admin/user/settingsdrupal-6-user-registrations
  3. Select “Only site administrators can create new user accounts.” and hit “Save Configuration”.

In case, you are more interested to make this change from Database level, you can use the following query on your database

UPDATE variable SET `value` = ‘s:1:”0″;’  WHERE `name` = ‘user_register’;

Hope you find this post useful. Cheers! If you have any questions, comment below or contact me here.