Automatically set the Group of a new file to the Group of the current user
-
I managed to automatically set the Group of a new Post to the Group of the current user, using:
Groups_Post_Access::create(
array(
‘post_id’ => $post_id,
‘group_id’ => $group_id
)
)
How could I accomplish the same thing (automatically set the Group) for the newly added FILES in the Media Library?
Is this possible only after installing the Groups File Access plugin?
(I understand that only the attachment page is restricted to authorized users, while the file can still be accessed directly via its URL, and to solve this we must use the Groups File Access plugin)
- The topic ‘Automatically set the Group of a new file to the Group of the current user’ is closed to new replies.