Closed (fixed)
Project:
Verify Email
Version:
1.1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
11 Nov 2025 at 09:49 UTC
Updated:
26 Nov 2025 at 09:39 UTC
Jump to comment: Most recent
Currently, the VerifyEmailForm will only display the verification form if the user is not logged in. Logged in users will be directed to the destination page immediately. This makes the module inflexible as sites may want to use it for logged in users.
Create a verification form. Go to form URL as any logged in user. Verify redirect to destination occurs.
"skip verify $id" permission has been created, so change check on form to only redirect for users with permission.
BuildForm function, after saving the entity to the form state, add $id = $entity->id()VerifyEmailForm and change $this->currentUser()->isAuthenticated() to $this->currentUser->hasPermission('skip verify $id')VerifyEmailRoutingTest:
skipUser class property.setUp, after saving the VerifyEmail entity, use drupalCreateUser to create a user with "skip verify verify_email_test" permission, and assign to the $this->skipUser property.testVerifyEmailRouteAuthenticatedUser function and give the copy a new name, and change to login as $this->skipUser.testVerifyEmailRouteAuthenticatedUser to check the path remains "/verify-email-form", since the admin user doesn't have the "Skip" permission.None.
None.
None.
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 #2
lostcarpark commented#3556368: Create custom permissions per verification form is now merged and fixed, so this issue is safe to proceed with.
Comment #3
ritarshi_chakraborty commentedWorking on it.
Comment #5
ritarshi_chakraborty commentedPlease review my MR.
Comment #6
lostcarpark commentedThank you for working on this.
I have reviewed the change, and I have carried out a manual test, and I'm happy this is working as expected.
Comment #8
lostcarpark commentedThank you for working on this, @ritarshi_chakraborty.
Change merged and contribution credit awarded.