Hello,

1) I would like to be able to customize the wording of the email being sent out when the user has expired
2) or disable the expiration completely.

It seems to be hard coded, is there anyway to do this?

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

JudyPJHsu created an issue. See original summary.

ervan.salin’s picture

StatusFileSize
new4.07 KB

It is possible to set a checkbox in the "admin/config/people/user-expire" form and set a Drupal variable to determine if a Email have to be sent to inactive users.

See this patch if it is good for your use case.

lomasr’s picture

StatusFileSize
new27.44 KB

I applied the patch in #2 . give me error. Please check the screen. I think patch needs a reroll.

ervan.salin’s picture

StatusFileSize
new3.41 KB

I reroll and tested the patch and it works.

lomasr’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 4: disable_expiration_email_2836514_2.patch, failed testing.

gonzaguer’s picture

StatusFileSize
new3.41 KB

Patch working fine for me.
Regenerated, if it can help.

astoker88’s picture

Status: Needs work » Reviewed & tested by the community

Can confirm patch in #7 is working well. Would be good to extend this to allow customization of the email template as well.

greggles’s picture

Status: Reviewed & tested by the community » Needs work

Thanks for the work writing and testing this.

There was a test failure the last time this was tested, so it needs work to make sure that the test is fixed or the code is fixed (or both).

The failure was "Expected text found in subject of email message: "Account expired"."

cafuego made their first commit to this issue’s fork.

cafuego’s picture

Version: 7.x-1.5 » 8.x-1.x-dev
Status: Needs work » Needs review

I'm hijacking this issue for the 8.x-1.x version, if it is accepted, we can do a re-backport :-)

The pull request adds UI elements to the config form to enable/disable the notification email and allows admins to customise the notification email. I've replaced the hardcoded limited set of tokens with that standard set of [site:] and [user:] mail tokens.

cafuego’s picture

StatusFileSize
new10.4 KB

Uploading a 7.x patch too, so I can use it in composer.

greggles’s picture

Status: Needs review » Needs work

This has a conflict now so needs a reroll. Marking needs work for that.

Thanks cafuego and others for the work on this so far.

cafuego’s picture

Hateful gitlab won't let me push to the feature branch for reasons I cannot fathom.

cafuego’s picture

Status: Needs work » Needs review

All the tests are green, so I guess now the only question is "does it still do what it is supposed to do" ;-)

joegraduate’s picture

StatusFileSize
new7.46 KB

Uploading latest MR diff as static patch file usable for composer.

joegraduate’s picture

Status: Needs review » Reviewed & tested by the community

We've tested the MR/patch with good results and are hoping this change will be committed soon as we'd like to use this module on several sites.

joegraduate’s picture

Status: Reviewed & tested by the community » Needs work

Most of the testing I've done with this patch was with the functionality for disabling email notifications. Taking a closer look at the functionality for customizing the notification email subject and message I see a potential config schema improvement that we may want to address before merging this.

I think we should replace the new mail.subject and mail.body config settings with a single setting of the mail config schema type consistent with how the core user module mail configuration settings work.

I also wonder if we need to include a database update function to apply the default mail config setting(s) to existing sites.

joegraduate’s picture

Version: 8.x-1.x-dev » 2.x-dev
joegraduate’s picture

Title: Disable or customize expiration email » Allow notification emails to be customized/disabled

trackleft2 made their first commit to this issue’s fork.

joegraduate’s picture

Status: Needs work » Needs review

Created a new MR targeting 2.x branch that includes rebased changes from original 8.x-1.x MR + the config schema changes and DB update described in #19.

joegraduate changed the visibility of the branch user_expire-2836514/8.x-1.x to hidden.

joegraduate changed the visibility of the branch 2855005-reset-expiry-on-reactivation to hidden.

trackleft2’s picture

Status: Needs review » Needs work
Related issues: +#3463221: Review and improve form field labels and description

I think the machine names for the settings should be more specific so they don’t exclude additional email/notification options, we can address the confusing labels in the config interface in follow-up issue #3463221: Review and improve form field labels and description

joegraduate’s picture

Status: Needs work » Needs review
trackleft2’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me!

joegraduate’s picture

Status: Reviewed & tested by the community » Needs review

Made some more improvements to the new settings in the settings form and the overall implementation of when the warnings are sent. This ready for final review now IMHO.

joegraduate’s picture

Title: Allow notification emails to be customized/disabled » Allow expiration warning emails to be customized/disabled

joegraduate changed the visibility of the branch 2836514-2.x to hidden.

joegraduate’s picture

Created new branch from existing MR (duplicate MR) to trigger tugboat.

joegraduate’s picture

joegraduate’s picture

Status: Needs review » Reviewed & tested by the community

  • joegraduate committed 46dffaf9 on 2.x
    Issue #2836514 by joegraduate, cafuego, ervan.salin, trackleft2,...
joegraduate’s picture

Status: Reviewed & tested by the community » Fixed

Merged.

Status: Fixed » Closed (fixed)

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