Closed (fixed)
Project:
User registration password
Version:
2.0.2
Component:
Miscellaneous
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Nov 2025 at 09:12 UTC
Updated:
17 Jun 2026 at 20:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ritarshi_chakraborty commentedWorking on it.
Comment #4
vinodhini.e commentedHi, Tested the User Registration Password module with Drupal 11.2.3.
Encountered the same error during user registration:
TypeError: _user_registrationpassword_mail_notify(): Return value must be of type array, true returned.
The error occurred immediately after submitting the registration form.
Applied the Merge Request #19, and after that, user registration worked successfully without any issues. Thanks.
Comment #5
ritarshi_chakraborty commentedThe test failure doesn't seem to be related to the changes I made. It depends on how you are creating the test user using
createUser().Comment #6
freelylw commentedany progress please ? or any alternative module that I can use for this purpose ? Thank you.
Comment #7
ritarshi_chakraborty commentedAlmost forgot about the issue—sorry for the delay! I’ve fixed all the pipeline errors now.
Comment #8
freelylw commentedHi, should I just download the .module file to replace the one in my system ? Thank you.
Comment #9
ritarshi_chakraborty commentedJust change the return type to mixed on line 605.
Comment #10
joe huggansTested and fixes the issue for me, the annotation on the _user_registrationpassword_mail_notify function probably needs updating however to reflect that it can return a mixed value.
I think we can mark this as RTBC once that is added?
Comment #11
jaypanIs all the work on this patch necessary? I'm finding that changing this line:
user_registrationpassword.module(626):
To this:
Solves the issue.
Comment #12
jaypanI don't know how to create a separate fork or a different MR when one already exists, so here's a patch that someone can test.
Comment #13
rob c commented@jaypan that patch looks really simple. Good job.
As a rule of thumb i always tried to stay in line with core.
There they do something similar:
Comment #14
coretex commentedIt looks like this issue is the same as 3557575.
Comment #15
coretex commentedComment #16
rob c commentedYes it does look like a dupe. Up to the current maintainers, just here with some (hope good) advice. Try to not change the footprint / return: Drupal core states array|null, they just don't define it (it's in the comment tough).
If i had to choose a patch/MR it would be the most simple one @ #12 in this issue, with a minor mod like i pointed out in #13. (i know, the other issue is older) (if people implemented something really custom on top of this, they might need the returned data)
Comment #19
intrafusionTaking on @jaypan & @rob-c comments, I have created a new MR which essentially mirrors core.
Without wanting to mark my own homework can someone quickly review this works as expected and I'll merge
Comment #21
coretex commentedHi Colin, thanks for picking up this issue. The MR fixed the issue! The error is gone and I receive an email.
Comment #22
intrafusion