Support » Plugins » [Plugin: User Photo] Small tweak to work with no approval

  • I set the field “Require user photo moderation for all users at or below this level” to a value of “(none)”, meaning that users can upload a photo and have it accepted without any approval needed. However, photos were still saying that they needed approval in WP 2.6.5.

    I think I figured out the issue. When checking permissions, the plugin checks to see if the user’s level is less than the required level. The required level in this case is -1, which is right. But the user’s level is blank ("") instead of zero ("0"). Since -1 is not less than a blank value, it acts like the user does not have the right permissions.

    I solved this by adding the following code before line 442 …

    if ($current_user->user_level == "") {$user_level = 0;} else {$user_level = $current_user->user_level;}

    … and then changing 442 to use my new $user_level variable instead of $current_user->user_level:

    if($user_level <= get_option('userphoto_level_moderated') ){

Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Plugin: User Photo] Small tweak to work with no approval’ is closed to new replies.