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'm trying to generate the path for a file based on a user which isn't currently logged in. filefield_widget_file_path() uses the currently logged in user; is there any reason why $user can't be a function parameter? If not, let me know and I'll work on a patch.
Thanks!
Comment | File | Size | Author |
---|---|---|---|
#2 | 419616_account_parameter.patch | 1.07 KB | deviantintegral |
Comments
Comment #1
quicksketchI'd be happy to change this to using an $account parameter.
Patchin' finger is ready. ;-)
Comment #2
deviantintegral CreditAttribution: deviantintegral commentedHere it is! I've also corrected the phpdoc for the first parameter.
Comment #3
quicksketchThanks, committed!
Comment #4
frankcarey CreditAttribution: frankcarey commentedNice, I just realized i needed this, thanks guys :)
Comment #5
frankcarey CreditAttribution: frankcarey commentedI noticed that field_file_save_file() suffers from the same issue?
#439952: Global user used to set the $file->uid]