Anonymous users can't see their filled PDF, even if admibn gives them the right to

Created on 26 April 2010, over 15 years ago
Updated 27 June 2025, about 1 month ago

In fillpdf.module, line 319, the following line is supposed to check if current user has the right to access the pdf file :

if (!($user->uid && (user_access('access own webform submissions') || user_access('access webform results') || user_access('access webform submissions'))))

The problem is that Anonymous user has the uid 0, so $user->uid will be considered as false by PHP, so the whole boolean expression is always false for anonymous users.
Since I really can't see any utility to check if $user->uid has a value, I fixed the bug by simply removing it :

if (!(user_access('access own webform submissions') || user_access('access webform results') || user_access('access webform submissions')))

See the attached patch below

πŸ“Œ Task
Status

Closed: outdated

Component

Code

Created by

πŸ‡«πŸ‡·France HervΓ© Saladin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024