Issue #3585024: Warn when "Notification User Before Deletion" is disabled with "Users pre-notified only" condition active
Closes #3585024.
Summary
Adds a validation warning when a Purge Users policy combines the "Users pre-notified only" condition (with notification_required enabled) with a pre-deletion notification that is effectively disabled. In that configuration, no user can ever be purged because the condition requires a prior notification record.
Changes
-
PurgeUsersPolicyEditForm::hasNotificationConflict()detects the conflict by looking up thepurge_users:notification_requiredcondition and evaluatingsend_email_user_before_notification(including thedefaultcascade to the site-wide setting). - When the conflict is detected on form load, the
Notification User Before Deletiondetails section is expanded and an inlinemessages--warningbox is shown. - When the policy is saved with the conflict, a
messenger()->addWarning()is also emitted so the admin sees the message after redirect.