Posted by nydrupalfan on May 3, 2006 at 2:35pm
| Project: | User Import |
| Version: | master |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Would it be possible to add an additional field to allow importing the user photo path from the text file? Right now I am uploading a bunch of images labeled by usernames and setting the path by editing an sql dump of the user table. This would help immensely. Thanks!
Comments
#1
This sounds interesting, but can't see how it would hang together.
Where do the images get uploaded?
- a directory in the user_import module directory? Somewhere else?
How do you put the filepath for each image into the csv file?
#2
yes, if picture support is enabled in user settings.
use Picture image path (specified by admin)
Subdirectory in the directory files/ where pictures will be stored.
#3
Does anyone know a way to do picture imports? specifying a file path seems to be the most logical.
#4
I wrote a patch to add some picture support - upload the pictures to the site user pictures directory. Have a field with the file name.
When the users are imported
<?php/**
* Import the picture data
*/
function user_user_import_picture_date($data, $settings = array()) {
// the site file directory, system user picture directory are prepended to the file name
return file_directory_path() . '/' . variable_get('user_picture_path', 'pictures') . '/' . $data;
}
?>
if you have files in a directory within the pictures directory then that directory needs to prepend to the file name in your csv file