- Issue created by @glennnz
I'm using the FillPDF module → to create a downloadable file for purchase. The PDF will be filled by data from a custom Checkout Pane.
Can I then, within my module, create a link to the file that ONLY the user who completed the order can have access to? For any other user, access is denied.
The link to the file will go into a custom email as a part of my module, and also be available on the User's account page as per normal.
I think I'll need something like:
use Drupal\file\FileInterface;
use Drupal\commerce_file\LicenseFileManagerInterface;
use Drupal\commerce_license\Entity\LicenseInterface;
use Drupal\commerce_file\FileDownloadController;
And then call which function to create access to the file for the current user???
Thanks,
Glenn
Active
2.0
Code