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

quicksketch’s picture

Status: Active » Closed (fixed)

Support 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.