• Resolved sirspence

    (@sirspence)


    At the moment in the file browser, the only way to tell who the upload has come from is from the “Uploaded By’ field, this shows their username that is generated by WP.

    However, we have usernames set to email address and that is how we are filing our users.

    Q, How can i change the ‘Uploaded by’ to their email address? Or add a new field – email?

    (As the short code generator is not showing please forgive me if this is a simple short code exercise)

    Thanks

    https://www.ads-software.com/plugins/wp-file-upload/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author nickboss

    (@nickboss)

    You need to make some code modifications of the plugin in order to get the email instead of the username.

    regarding the shortcode composer, please upgrade to the latest version 2.7.6

    Let me know if you need anything else…

    Nickolas

    Thread Starter sirspence

    (@sirspence)

    Thanks Nickolas, could you point me in the right direction please, is it the main wordpress_file_upload.php file that needs editing? With thanks in advance

    Plugin Author nickboss

    (@nickboss)

    supposing that you have the free version 2.7.6 edit file wfu_admin_browser.php inside /lib folder of the plugin’s directory.

    In line 192 replace

    $file['user']

    with:

    ( $file['user'] == 'guest' ? 'guest' : ( ($a = get_user_by('login', $file['user'])) === false ? 'unknown' : $a->user_email ) )

    This code will display the email instead of the username. In case the file was uploaded by a visitor, it will display ‘guest’. If the cannot be found by its username (e.g. has been erased) then it will display ‘unknown’.

    Nickolas

    Thread Starter sirspence

    (@sirspence)

    Thanks Nickolas for your quick response and perfect instructions!

    Plugin Author nickboss

    (@nickboss)

    you are welcome….

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘File browser data – 'Uploaded By'’ is closed to new replies.