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.
Hi,
while reviewing the code, I found this:
function media_mover_ftp_extract_user($ftp_file, &$file, $configuration) {
// check the top level director for a user name
if ($configuration['mm_ftp_user_from_dir']) {
if ($account = user_load(array('name' => $ftp_file['user_name']))) {
$file['data']['user'] = $account;
return;
}
}
if ($user = media_mover_ftp_token_check($ftp_file['token'])) {
$file['data']['user'] = $account; // CHECK THIS
}
}
Check the assignment line (in bold). AFAIK, this won't work since $account doesn't exist there? Shouldn't this assign a $user object?
Comments
Comment #1
hatsch CreditAttribution: hatsch commentedsame issue here. with recent dev version as well as beta7
new nodes are created with the file from ftp attached, but the node owner is set to whatever is set in the mediamover config as default value.
have you figured out any solution?