src/Drupal/Driver/Cores/Drupal6.php 1 location
|
@@ 65-67 (lines=3) @@
|
| 62 |
|
} |
| 63 |
|
|
| 64 |
|
// Assign authorship if none exists and `author` is passed. |
| 65 |
|
if (!isset($node->uid) && !empty($node->author) && ($user = user_load(['name' => $node->author]))) { |
| 66 |
|
$node->uid = $user->uid; |
| 67 |
|
} |
| 68 |
|
|
| 69 |
|
// Convert properties to expected structure. |
| 70 |
|
$this->expandEntityProperties($node); |
src/Drupal/Driver/Cores/Drupal7.php 1 location
|
@@ 44-46 (lines=3) @@
|
| 41 |
|
*/ |
| 42 |
|
public function nodeCreate($node) { |
| 43 |
|
// Assign authorship if none exists and `author` is passed. |
| 44 |
|
if (!isset($node->uid) && !empty($node->author) && ($user = user_load_by_name($node->author))) { |
| 45 |
|
$node->uid = $user->uid; |
| 46 |
|
} |
| 47 |
|
|
| 48 |
|
// Convert properties to expected structure. |
| 49 |
|
$this->expandEntityProperties($node); |