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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kirkkala created an issue. See original summary.

greggles’s picture

Seems OK to me. Why not 1?

Can you provide a patch?

kirkkala’s picture

Status: Active » Needs review
FileSize
360 bytes

Sure 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.

dpi’s picture

Status: Needs review » Needs work

Adding a dependency to system:user in info.yml should do the same. No need to juggle weights.

greggles’s picture

Title: Increase module weight » Ensure genpass runs after other modules so it creates passwords on all users
Status: Needs work » Needs review
FileSize
389 bytes

This 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?

dpi’s picture

You got it ;)

  • greggles committed c681477 on 8.x-1.x
    Issue #3100594 by kirkkala, greggles, dpi: Ensure genpass runs after...
greggles’s picture

Status: Needs review » Fixed

Great, 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.