• Resolved chrisconklin

    (@chrisconklin)


    when people sign up for membership, they have the option to upload an image for their profile picture. if they choose not to upload one at the time of signup, the plugin displays a broken image link icon. I have place a background image in the container for the time being so something is there, but it’s pretty ugly until they upload an actual image.

    I don’t want to make the image upload required if I don’t have to.

    is there a way to set a default image if the user doesn’t upload anything at signup?

    thanks!
    -chris

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor etoilewebdesign

    (@etoilewebdesign)

    Hi Chris,

    At the moment there’s no option in the plugin settings for this. However, it can easily be achieved by modifying a line of code in the “Insert_User_Profile.php” file, which is found in the “Shortcodes” folder.

    First, you can create your placeholder image and put it in the same “wp-content/uploads/ewd-feup-user-uploads” folder that user uploads are placed in. Let’s say you name your file “my-image.jpg”.

    Then, the line in the mentioned file that you’d want to look for is:

    else {$ReturnString .= "<img class='ewd-feup-profile-picture' src='" . site_url("/wp-content/uploads/ewd-feup-user-uploads/") . $Value . "' alt='" . $Field->Field_Name . "'/>";}
    

    Replace that line with the following:

    else {
        if($Value == ""){$Value = "my-image.jpg";}
        $ReturnString .= "<img class='ewd-feup-profile-picture' src='" . site_url("/wp-content/uploads/ewd-feup-user-uploads/") . $Value . "' alt='" . $Field->Field_Name . "'/>";
    }
    

    Just note that, if you update the plugin, it will overwrite this change.

    Thread Starter chrisconklin

    (@chrisconklin)

    thank you!

    this worked perfect!
    thanks so much for your time on this.

    -chris

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘default profile picture?’ is closed to new replies.