@@ -335,21 +335,21 @@ protected function parseAuthorIds($feedData, $fieldInfo): ?array
335
335
if ($ element ) {
336
336
$ matchedIds [] = $ element ->id ;
337
337
}
338
- }
339
338
340
- // Check if we should create the element. But only if email is provided (for the moment)
341
- if ($ create && $ match === 'email ' ) {
342
- $ element = new UserElement ();
343
- $ element ->username = $ value ;
344
- $ element ->email = $ value ;
339
+ // Check if we should create the element. But only if email is provided (for the moment)
340
+ if ($ create && $ match === 'email ' ) {
341
+ $ element = new UserElement ();
342
+ $ element ->username = $ value ;
343
+ $ element ->email = $ value ;
345
344
346
- if (!Craft::$ app ->getElements ()->saveElement ($ element , true , true , Hash::get ($ this ->feed , 'updateSearchIndexes ' ))) {
347
- Plugin::error ('Entry error: Could not create author - `{e}`. ' , ['e ' => Json::encode ($ element ->getErrors ())]);
348
- } else {
349
- Plugin::info ('Author `#{id}` added. ' , ['id ' => $ element ->id ]);
350
- }
345
+ if (!Craft::$ app ->getElements ()->saveElement ($ element , true , true , Hash::get ($ this ->feed , 'updateSearchIndexes ' ))) {
346
+ Plugin::error ('Entry error: Could not create author - `{e}`. ' , ['e ' => Json::encode ($ element ->getErrors ())]);
347
+ } else {
348
+ Plugin::info ('Author `#{id}` added. ' , ['id ' => $ element ->id ]);
349
+ }
351
350
352
- $ matchedIds [] = $ element ->id ;
351
+ $ matchedIds [] = $ element ->id ;
352
+ }
353
353
}
354
354
355
355
return $ matchedIds ;
0 commit comments