Problem/Motivation
The https://git.drupalcode.org/project/mailing_list/-/commit/7ca34df2016bab2... commit broke setting of right email_confirmation_status property and creating Email Confirmation. The above leeds to unable to verify subscription by anonumous users.
Steps to reproduce
Install latest mailing_list_confirm module as usual, configure email confirmation and try to subscribe under anonymous
Proposed resolution
The getOwner() method returns every time an Drupal\user\Entity\User object, even for anonymous user.
We need to combine $entity->getOwner() and $entity->getOwner()->hasPermission() conditions, to prevent early return bypassing inside:
- mailing_list_confirm_mailing_list_subscription_presave
- mailing_list_confirm_mailing_list_subscription_update
Remaining tasks
Review and test changes
Issue fork mailing_list-3305205
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
Comment #3
vlad.dancerComment #4
jlscott CreditAttribution: jlscott commentedThanks for picking up the error in the commit from #3303237 and providing a fix.
Comment #5
jlscott CreditAttribution: jlscott commentedMerged into 8.x-1.x