I don't want to delete unverified users, I just want to block them. It would be nice if this was an option in logintoboggan.

I will work on a patch.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pjcdawkins created an issue. See original summary.

organicwire’s picture

Status: Active » Needs review
FileSize
5.6 KB

Here's a patch for the desired functionality. Note that for security reasons, the default changed from delete users to block users. That's a more conservative setting that prevents losing data (such as when users already created content).

In admin/config/system/logintoboggan a few things changed:
- new setting Disable operation
- renamed Purge unvalidated users after into Disable unvalidated users after
- moved all related items into their own field group

pjcdawkins’s picture

Assigned: pjcdawkins » Unassigned
Status: Needs review » Needs work

Thanks for the patch! I've reviewed by eye.

The patch introduces the words "disable" and "discard" (as well as the Drupal core terminology, "block") which I think add unnecessary extra meaning. I think the word "purge" could still be used to mean either blocking or deleting: I'd recommend using that. It would then be the same word in the UI and in the code (it would match logintoboggan_purge_operation).

gbyte’s picture

Status: Needs work » Needs review

@pjcdawkins The patch addresses a critical issue of this module (which you yourself reported) and is working perfectly for me. The proposed terminology makes it clear what happens with unauthenticated users and seems sensible. If you disagree with the terminology, please do not block the patch by tagging it 'needs work'. Instead, please upload a patch yourself (and an interdiff if possible) so we can quickly go on with getting it commited.

To me #2 is RTBC.

organicwire’s picture

@pjcdawkins says:

The patch introduces the words "disable" and "discard" (as well as the Drupal core terminology, "block") which I think add unnecessary extra meaning. I think the word "purge" could still be used to mean either blocking or deleting: I'd recommend using that.

Thanks for your review. I agree that somehow an extra meaning is introduced. However, I think that it's needed. The term "purge" very much sounds like deletion. So I propose to use the term "Disable" that distinctively means blocking users and not deleting them.

If there's any native english speaker around with better suggestions, I'm happy to see your patches!

organicwire’s picture

Hi @pjcdawkins, do you have any suggestions? I'll be happy to see another patch.

organicwire’s picture

Added a fix: When blocking users you want unpublish their content. This is included in the new patch. Before their content was left untouched.

organicwire’s picture

Include new variable in contrib/logintoboggan_variable/

organicwire’s picture

Patch #8 breaks cron run when no unvalidated users exist. The new patch fixes this. Applies on 7.x-1.5