Accès contributeur scopé sur leurs propres publications
This commit is contained in:
@@ -97,7 +97,8 @@ class Thalim_HAL_Importer_Logic {
|
||||
array $wp_users_by_hal_id = [],
|
||||
string $post_status = 'pending',
|
||||
bool $backdate_post = false,
|
||||
array $spip_context = []
|
||||
array $spip_context = [],
|
||||
?int $force_post_author = null
|
||||
) {
|
||||
$hal_id = $hal_doc['halId_s'] ?? '';
|
||||
$doc_type = $hal_doc['docType_s'] ?? '';
|
||||
@@ -118,7 +119,8 @@ class Thalim_HAL_Importer_Logic {
|
||||
$matched_user_names[] = $user['name'];
|
||||
}
|
||||
}
|
||||
$post_author = !empty($matched_user_ids) ? $matched_user_ids[0] : 1;
|
||||
$post_author = $force_post_author
|
||||
?? (!empty($matched_user_ids) ? $matched_user_ids[0] : 1);
|
||||
|
||||
// --- Create the post ---
|
||||
$post_args = [
|
||||
|
||||
Reference in New Issue
Block a user