Problem/Motivation
When setting up a multi-page user registration, the "Registration successful. You are now logged in." message gets shown at every step and the user welcome email is also sent each time.
This is probably due to a core "user creation" form handler being triggered with every submit.
Steps to reproduce
Create a Forms Steps workflow with multiple steps for a user.
Proposed resolution
Unknown.
Comments
Comment #2
dieuweIt appears this is because the Drupal/user/RegisterForm::save() function is called at every step.
The way to stop this would be to replace the ::save call on the submit buttons with your own, and just make sure that you call save() on the user entity via that custom submit handler. That should by-pass all the other checks and status messages.
Comment #3
nicoloye commentedThanks for your help on this, I'll check if I can propose a better handling of the saving call on this issue.