Posted by deviantintegral on March 31, 2009 at 4:11pm
4 followers
| Project: | FileField |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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!
Comments
#1
I'd be happy to change this to using an $account parameter.
<?phpfunction filefield_widget_file_path($field_instance, $account = NULL) {
$account = isset($account) ? $account : $GLOBALS['user'];
?>
Patchin' finger is ready. ;-)
#2
Here it is! I've also corrected the phpdoc for the first parameter.
#3
Thanks, committed!
#4
Nice, I just realized i needed this, thanks guys :)
#5
I noticed that field_file_save_file() suffers from the same issue?
#439952: Global user used to set the $file->uid]
#6
Automatically closed -- issue fixed for 2 weeks with no activity.