Drupal8: Problem with user registration confirm email flow
In our Drupal8 & CiviCRM setup we allow visitors to create accounts, with email verification. These users are created by CiviCRM when they sign up for a membership.
We encountered some issues around the registration process: the user was denied permission to the password form. And the onetime login link in the mail was always invalid.
In the CRM/Utils/System/Drupal8.php file we changed some of the user registration logic to be the same as the default Drupal 8 way.
-
First issue was that the user account was not set to 1 (active) when $verify_mail_conf was set to true. In default drupal this is the case.
-
Second issue was the user was logged in immediately after sending the verification mails, this should not happen when the verify_mail_conf setting is true. User may only be logged in when checking the mail and following the onetime login link.