20

Recently I've been receiving a lot spam registrations. My website is quite basic and I do not need for users register.

  1. what would the likely url be that the spam bots are finding?
  2. is there a way to turn off this registration. I know I could use a captcha. But as I don't actually need users to register I'd rather turn the feature off.
36

Check here.

While it's technically possible to remove the login functionality, you shouldn't, because then your administrator could never log onto the site.

In order to remove the register functionality, you simply need to browse to admin/user/settings (for Drupal 6) or admin/config/people/accounts (for Drupal 7 and 8) and select the the "Only site administrators can create new user accounts" options.

0

As an additional step to the above you could change the default url path from /user login screen using "rename admin paths" module to something nobody would guess.

Eg, www.sitename/randomcombition/ < this way user's will have to know this url before they can even try logging in.

0

You can disable the forms all together. In a custom module:

function MYMODULE_form_alter(&$form, &$form_state, $form_id) {
  switch($form_id) {
    case 'user_login':
    case 'user_register_form':
      $form['#access'] = FALSE;
    break;
  }
}

Depending on your needs, you can either create a custom page and set the login block there, so you and other administrators can login, or install HybridAuth module to allow visitors to login and register new accounts only through social media 3rd parties.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.