Title: [Plugin: Frontend Uploader] Admin-side : Force File Author ?
Last modified: August 20, 2016

---

# [Plugin: Frontend Uploader] Admin-side : Force File Author ?

 *  Resolved [dapickboy](https://wordpress.org/support/users/dapickboy/)
 * (@dapickboy)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-frontend-uploader-admin-side-force-file-author/)
 * Hi !
    When I upload a file as a visitor (i.e. not logged in), the file get no
   author. It’s fine for me, but when I approve it through the manager, it sets 
   my user as the author of the file. Could it be possible to force it to be “visitor”(
   for example, but maybe it’s impossible for WP to set it at a non-existent user…)
   at upload ? Or maybe add some info via filters to let us know that, in our big
   media library, this file was uploaded via frontend uploader ?
 * Anyway, the plugin works like a charm !
 * [http://wordpress.org/extend/plugins/frontend-uploader/](http://wordpress.org/extend/plugins/frontend-uploader/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Rinat](https://wordpress.org/support/users/rinatkhaziev/)
 * (@rinatkhaziev)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-frontend-uploader-admin-side-force-file-author/#post-3029266)
 * Howdy,
 * Yes, it’s totally possible with filter ‘fu_after_upload’. You might want to create
   a dummy user, say “Visitor”, set its role to Subscriber. Say, it has ID 3. After
   that put something like the code snippet below into your theme’s functions.php.
 *     ```
       add_action( 'fu_after_upload', 'my_fu_after_upload' );
       function my_fu_after_upload( $attachment_ids ) {
           // do something with freshly uploaded files
           foreach ( $attachment_ids as $att_id ) {
              // Set a different author
               wp_update_post( array( 'ID' => $att_id, 'post_author' => 3 ) );
           }
           // This happens on POST request, so $_POST will also be available for you
       }
       ```
   
 * I’m glad that you’re enjoying the plugin, mind giving some stars? 🙂
 *  Thread Starter [dapickboy](https://wordpress.org/support/users/dapickboy/)
 * (@dapickboy)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-frontend-uploader-admin-side-force-file-author/#post-3029296)
 * Hi !
 * For sure I’ll give it five stars ! Though there might be some improvement or 
   functions to come, it does a very good job and is really versatile through the
   hooks and filters. That’s great !
 * And thanks a lot for your snippet, it’s just what I wanted. And I even didn’t
   thought of creating a dummy user…

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Frontend Uploader] Admin-side : Force File Author ?’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/frontend-uploader_81a69d.svg)
 * [Frontend Uploader](https://wordpress.org/plugins/frontend-uploader/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/frontend-uploader/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/frontend-uploader/)
 * [Active Topics](https://wordpress.org/support/plugin/frontend-uploader/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/frontend-uploader/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/frontend-uploader/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [dapickboy](https://wordpress.org/support/users/dapickboy/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-frontend-uploader-admin-side-force-file-author/#post-3029296)
 * Status: resolved