Skip to content
Snippets Groups Projects
Commit 686e3180 authored by twistor's avatar twistor Committed by Franz Glauber Vanderlinde
Browse files

Issue #1241754: Add targets for author name and email in node processor.

parent d3aee651
No related branches found
No related tags found
No related merge requests found
......@@ -230,6 +230,16 @@ class FeedsNodeProcessor extends FeedsProcessor {
}
$target_node->path['alias'] = $value;
break;
case 'user_name':
if ($user = user_load_by_name($value)) {
$target_node->uid = $user->uid;
}
break;
case 'user_mail':
if ($user = user_load_by_mail($value)) {
$target_node->uid = $user->uid;
}
break;
default:
parent::setTargetElement($source, $target_node, $target_element, $value);
break;
......@@ -258,6 +268,14 @@ class FeedsNodeProcessor extends FeedsProcessor {
'name' => t('User ID'),
'description' => t('The Drupal user ID of the node author.'),
);
$targets['user_name'] = array(
'name' => t('Username'),
'description' => t('The Drupal username of the node author.'),
);
$targets['user_mail'] = array(
'name' => t('User email'),
'description' => t('The email address of the node author.'),
);
$targets['status'] = array(
'name' => t('Published status'),
'description' => t('Whether a node is published or not. 1 stands for published, 0 for not published.'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment