Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I would suggest to increase the genpass module weight (e.g. to 100) to allow it hooking into user account creation pages created by other modules.
The use-case where this was noticed is group module (dev-version and core 8.8.0) with the patch that allows the group admins to create user account and add to group
With the genpass default weight of 0 the user creation form at /group/%/content/create/group_membership
does not respect the genpass configurations.
Comment | File | Size | Author |
---|---|---|---|
#5 | 3100594-genpass-dependency-on-user.patch | 389 bytes | greggles |
#3 | update_module_weight-3100594-2.patch | 360 bytes | kirkkala |
Comments
Comment #2
gregglesSeems OK to me. Why not 1?
Can you provide a patch?
Comment #3
kirkkalaSure I can, attached a patch with update hook.
And yes you are right weight 1 seems to be enough with the case of group module.
Comment #4
dpiAdding a dependency to system:user in info.yml should do the same. No need to juggle weights.
Comment #5
gregglesThis is just logical for genpass to depend on user. It seems like this patch could go in right away and then we could see if that fixes the problem in groups or if we need to do a weight-based solution.
Looking at examples in core and some random contribs I see `drupal:user` and not `system:user`. So, this patch does `drupal:user`.
@dpi Did you mean system:user specifically as something different than drupal:user?
Comment #6
dpiYou got it ;)
Comment #8
gregglesGreat, thanks for the confirmation. I've committed that for now (with credit to the 3 of us). I'm going to mark this as "fixed" since I hope that's the case, but please reopen it if there is a continued problem.