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 added a restriction that only the webform owner can see the submissions.
Now I want that another specific user can access submissions of a specific webform. I added the following code in the beginning of webform_submission_access() but access is not granted:
global $user;
if($user->uid == 4) {
return true;
}
Is there any other place I should look into? Or what?
Thanks.
P.S.
I give it here hard-coded for simplicity in order to reduce variables. The full code (including reading from an extra table) is used.
Comments
Comment #1
quicksketchSupport for writing custom code (or just hacking the module in this case) is not provided in the Webform issue queue. Any modifications you do though, should be done in a separate module. I'd suggest looking into module development and hook_menu_alter() to change the permissions access.