WordPress.org

Ready to get started?Download WordPress

Forums

WP User Frontend
[resolved] only admin can upload photo? (7 posts)

  1. qzha017
    Member
    Posted 1 year ago #

    Hi Tareq
    This is a awesome plugin but when I was testing I found out when I logged in as a user (all registers are set as authors in WP settings)
    I can not upload image? It will stay at 100% but the blue cross arrow wont appear no matter how long I wait and the file is very small. If I would just submit then no image is uploaded or attached.

    But If I log in as administrator then I only have to wait few seconds for the blue cross arrow to appear and my image is uploaded.

    Can you please help me to solve this?
    I can upload fine on the other form plugin and I have set the upload folder permission to 777, so I suspect I need to change something with this plugin?

    Thank you for your help

    http://wordpress.org/extend/plugins/wp-user-frontend/

  2. reigelgallarde
    Member
    Posted 1 year ago #

    I'm not sure about that, but I tried making a user with author role and tested the plugin, works fine.

  3. qzha017
    Member
    Posted 1 year ago #

    I think I have found out the problem, I am using the Front end user plugin as well, this is to prevent anyone except admin to access the dashboard (backend) and somehow it prevents anyone to access the media upload as well.
    So if any user other than admin who need to upload images wont be able to do so, I was wondering if users (other than admin) are able to write and submit post without access backend then why can't it let users upload files to media as well?

    And I can upload fine on the other plugin.

    to solve this:
    1.) I might have to remove the front end user plugin and use some other method of preventing backend access.

    2.) Hack into either front end user or WP frontend and change some source code so it force uploads without requiring admin access to media (which I have no Idea how to do)

    Hey Reigel are your users able to access the backend of your site? if not how are you doing this?

  4. qzha017
    Member
    Posted 1 year ago #

    sorry the backend access restriction is build in wp user frontend.
    I have ditched the front end user plugin, wasted over 2 days customizing it...But none the less problem solved

  5. reigelgallarde
    Member
    Posted 1 year ago #

    I have tried again... still working fine... even access to backend is set to admin only...

    hmm... why not make another wordpress installation on your localhost, and try this plugin on a fresh wordpress setup and see if the problem is really there...

    Sorry bro, I can't help you if I can't reproduce the problem.

  6. qzha017
    Member
    Posted 1 year ago #

    its all good Reigel I removed the Front-End-User plugin all working now.

    But do you know the error message:

    Access Denied. Your site administrator has blocked your access to the WordPress back-office.

    when someone (other than admin) tries to access dashboard?
    I want to change that to my 404.php page.

    the code for that message is:

    * Block user access to admin panel for specific roles
         *
         * @global string $pagenow
         */
        function block_admin_access() {
            global $pagenow;
    
            $access_level = wpuf_get_option( 'admin_access' );
            $valid_pages = array('admin-ajax.php', 'async-upload.php', 'media-upload.php');
    
            if ( !current_user_can( $access_level ) && !in_array( $pagenow, $valid_pages ) ) {
                wp_die( __( 'Access Denied. Your site administrator has blocked your access to the WordPress back-office.', 'wpuf' ) );
            }
        }
  7. sushidread
    Member
    Posted 1 year ago #

    Hi, I just installed the plugin, as an admin I can upload images, but as author gives me an error when uploading. I’m using wp 3.5
    Any idea on how to solve this?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic