Make "Who can register accounts?" "Administrators only" by default

Created on 10 June 2024, 3 months ago
Updated 26 June 2024, 2 months ago

Problem/Motivation

By default Drupal enables account creation (with verification)
This is no longer adequate since you will quickly get flooded by many, many, many spam accounts.
If you are going to enable anonymous account creation you need to set up several contrib modules to protect your site before you enable them.

Steps to reproduce

Install Drupal fresh.

Proposed resolution

Set account creation to Administrators only by default.

Remaining tasks

None

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

The default value of the "Who can register accounts?" setting has changed from "Visitors, but administrator approval is required" to "Administrators only" for any new sites built with either the "Standard" or "Minimal" installation profiles.

๐Ÿ“Œ Task
Status

Fixed

Version

11.0 ๐Ÿ”ฅ

Component
User moduleย  โ†’

Last updated 1 day ago

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States nicxvan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @nicxvan
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada mandclu

    +1 for this idea. Providing the most secure option as the default makes sense.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States cilefen

    +1

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dww

    +1. I have to do this on every site I set up. Admin-only should be the default until folks opt-in to something more permissive.

  • Merge request !8363Update default user creation permission โ†’ (Open) created by nicxvan
  • Pipeline finished with Failed
    3 months ago
    Total: 930s
    #195695
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States nicxvan

    I updated the minimal test to match new defaults.

  • Pipeline finished with Success
    3 months ago
    Total: 509s
    #195720
  • Status changed to Needs review 3 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States nicxvan
  • Status changed to RTBC 3 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dww
    1. Changes look reasonable to me, and IMHO are all in scope.
    2. Pipeline is green.
    3. I took a stab at a release note snippet (which we'll definitely need).
    4. I'm not sure if this needs a CR for distribution maintainers, too.
    5. Bumping to RTBC so the Product managers will see it and make a final call both on the change, and the need for a CR or not.

    Thanks!
    -Derek

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States nicxvan
  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland lauriii Finland

    This feature to some extent goes together with the Comment module because this way you can get your username verified. I still think it makes sense to disable this behavior by default because usually if you want to accept registrations on the site, that's would be an explicit decision. It seems fine to require an extra step for that, given that there's likely couple of other extra steps you'd have to take in order to avoid getting tons of spam accounts.

  • ๐Ÿ‡ญ๐Ÿ‡บHungary Gรกbor Hojtsy Hungary

    I agree with Lauri and others above. Unfortunately the internet became a place where you need to set up extensive protections to even attempt to enable user registration publicly. :/ Most of those don't come with core so you may be in for some nasty surprises before you may have a chance to set up the tools to avoid it.

  • Status changed to Needs work 3 months ago
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom alexpott ๐Ÿ‡ช๐Ÿ‡บ๐ŸŒ

    Added a review comment to the MR - we need to add a positive assertion to the test now that we changed an assertion to a negative one.

  • Pipeline finished with Success
    3 months ago
    Total: 576s
    #197279
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States nicxvan

    I addressed @alexpott's feedback, I'll create a change record, I didn't see anyone say it's necessary, but I suspect it will be.

  • Status changed to Needs review 3 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States nicxvan

    CR created.

  • Status changed to RTBC 3 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dww
    1. I made a very minor edit to the CR. Agreed itโ€™s worth having.
    2. Good catch on the test comment. Apologies I missed that. Thatโ€™s what I get for quickly reviewing on my phone. ๐Ÿ˜…
    3. Changes look good. Feedback addressed. Pipeline is green.

    Back to RTBC.

    Thanks,
    -Derek

  • Pipeline finished with Success
    3 months ago
    Total: 568s
    #197317
  • Status changed to Fixed 3 months ago
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom alexpott ๐Ÿ‡ช๐Ÿ‡บ๐ŸŒ

    Committed b719931 and pushed to 11.x. Thanks!

    • alexpott โ†’ committed b719931e on 11.x
      Issue #3453676 by nicxvan, alexpott, dww, lauriii, Gรกbor Hojtsy: Make "...
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024