Forums

[user-photo] Remove photo approval (8 posts)

  1. joaojotta
    Member
    Posted 3 years ago #

    Is there a way to remove the photo approval? It would bee nice for users to immediately see the picture.

  2. vampirefish
    Member
    Posted 3 years ago #

    In the Dashboard / Manage / User Photo, I made sure that the following were set to none:
    - Notify this administrator by email when user photo needs approval
    - Require user photo moderation for all users at or below this level

  3. vampirefish
    Member
    Posted 3 years ago #

    Sorry that was Settings / User Photo (not Manage)

  4. joaojotta
    Member
    Posted 3 years ago #

    I have those same setting but still I have to accept every user photo.
    I'd like to let people just have whatever photo they want without my aproval.

  5. Chris Andersen
    Member
    Posted 3 years ago #

    Hi,
    I'm also interested in this. I have the same challenge.

  6. manaf2009
    Member
    Posted 3 years ago #

    Hi PPl ,,,
    I've Just Found A Way To Remove The Photo Approval ,,,
    You Have To Play a Little With The Plugin Code
    -Go To Plugins and Click On Edit Beside The User Photo Plugin
    -Search For The Following Code:
    -----------------------------------------------------------------
    #Update usermeta if($current_user->user_level <= get_option('userphoto_level_moderated')){update_usermeta($userID, "userphoto_approvalstatus", USERPHOTO_PENDING);
    -----------------------------------------------------------------

    -Now Change "USERPHOTO_PENDING" In The End To "USERPHOTO_APPROVED"

    So That The Code Becomes :
    -----------------------------------------------------------------
    #Update usermeta if($current_user->user_level <= get_option('userphoto_level_moderated')){update_usermeta($userID, "userphoto_approvalstatus", USERPHOTO_APPROVED);
    -----------------------------------------------------------------

    I've Created 2 Subscriber Users For Testing ,,, No Approval Is Needed Anymore

    Hope That Was Helpful :D

  7. belinde
    Member
    Posted 3 years ago #

    I dislike editing the plugins, 'cause problems on updates... I created instead a new plugin with only these few lines:

    add_action( 'profile_update' , 'auto_approve_photo' , 1000 );
    function auto_approve_photo() {
    	global $current_user;
    	if ( defined( 'IS_PROFILE_PAGE' ) ) {
    		update_usermeta( $current_user->ID , 'userphoto_approvalstatus' , USERPHOTO_APPROVED );
    	}
    }

    Appending action with priority 1000 make the update running after userphoto_profile_update() but before userphoto_display_selector_fieldset(), so no warning about approval will be displayed to user!

  8. Scad
    Member
    Posted 3 years ago #

    Hey belinde,
    I know this is going to be a stupid question... but how can I create a new plugin with that information you provided?

    I created a php file with a header and license info (put your information and a link to this article in it) and then added your above code, but upon uploading and activating, it just showed the code at the top of the screen and broke my site. I know I'm just missing something little, but the wordpress tutorials on making plugins that are out there weren't that helpful.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags