User registration confirmation message does not appear when admin authorisation is not needed.

Created on 19 March 2024, 6 months ago
Updated 23 March 2024, 6 months ago

Problem/Motivation

In certain conditions user registration can be confusing as there is no success message or instructions.

Steps to reproduce

When the registration settings are left as the default
As an unregistered and anonymous user
Visit: /user/register
Fill in the user with valid details
After submitting the form the user is redirected to the homepage and a message is set to let the user know what has happened.
This is correct IMHO

Login as an admin
Visit: /admin/config/people/accounts
Alter the registration settings:
Change the "Who can register accounts?" setting to be set to "Visitors"
Leave "Require email verification when a visitor creates an account" set to ticked.
Log out and then
As an unregistered and anonymous user
Visit: /user/register
Fill in the user with valid details
After submitting the form the user is now returned to the register form but no message is set to let the user know what has happened.
This could look like nothing has happened and, potentially, looks like the form has failed
An email is sent, however which is the only indication to the new user that the process worked.
On logging in as an admin, you can see the account is correctly.

Proposed resolution

As per the email and administrator approval process, the user should be redirected to the homepage with instructions to check their email for more information.

Remaining tasks

Ensure all the scenarios are covered in the registration process
Write a test to ensure this works properly

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

🐛 Bug report
Status

Closed: cannot reproduce

Version

11.0 🔥

Component
User module 

Last updated 1 day ago

Created by

🇬🇧United Kingdom the_g_bomb

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

Comments & Activities

  • Issue created by @the_g_bomb
  • Status changed to Postponed: needs info 6 months ago
  • 🇮🇳India sukr_s

    I'm unable to reproduce the issue. I tried the above steps and I see the message "A welcome message with further instructions has been sent to your email address." on the front page after registration.

    Can you try with a clean Drupal setup and confirm if you are facing the problem.

  • Status changed to Closed: cannot reproduce 6 months ago
  • 🇬🇧United Kingdom the_g_bomb

    Apologies,

    I have retested with a clean and up-to-date version of Drupal 10.2.4. I can confirm the issue does not occur.

    I will have a look at the site that is experiencing the issue and try to determine why the user account does not get a welcome message as described above.

Production build 0.71.5 2024