Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a content type that Anon users can submit, and I only want to allow one submission per person. I am requiring they enter their email address and using this to check for duplicate submissions from the same person via the Unique Field module
It works perfectly if i am logged in, I get the error saying "The email field must be unique", however, when I try and submit it from an anon user (not logged in) it allows me to submit the content/node. The check either isn't happening or I have my settings mis-configured.
Any help?
Comment | File | Size | Author |
---|---|---|---|
#5 | unique_field_anonymous-1846088.patch | 567 bytes | kkalashnikov |
Comments
Comment #1
anthonyvz CreditAttribution: anthonyvz commented[UPDATE]
It's actually ONLY working for the root user. I can submit duplicate nodes as any other user.
Is there a permissions thing I am missing here??
Comment #2
anthonyvz CreditAttribution: anthonyvz commented[UPDATE]
This will only work if the user has the permission to Access the content.
I am using Content Access to restrict access, seems these two modules don't work together.
Comment #3
D2ev CreditAttribution: D2ev commentedIt's may be an issue due to entityfield query which won't return result for other user role. You can add " $efq->addTag('DANGEROUS_ACCESS_CHECK_OPT_OUT');" after line number 299 in unique_field.module file.
Comment #4
Pravin Ajaaz CreditAttribution: Pravin Ajaaz commentedComment #5
kkalashnikov CreditAttribution: kkalashnikov commentedPlease apply attached patch for this