Simple Local Avatars
Avatar doesnt get saved in fornt end (8 posts)

  1. gixty7
    Posted 4 years ago #


    I am using profile builder plugin and simple-local-avatars so users can upload an avatar from the front end. However, the picture doesnt get saved when they update their profile.


  2. xaja
    Posted 4 years ago #

    same bug!

  3. Thandrol
    Posted 3 years ago #

    To fix this you need to copy the 'views' folder from the plugin to your theme. Then edit the settings.php file, line 41. Add id="your-profile" to the form.

    <form action="<?php echo feu_get_url('settings'); ?>" method="post" id="your-profile">

  4. nicolaelvin
    Posted 3 years ago #

    Do you know how to fix this when not using a plugin to show the profile? I am just using php to echo out the profile form and saving it.

  5. syarul
    Posted 3 years ago #

    you need to pass parameters to the plugin setup_actions to ensure simple-local-avatars can upload the file.

    1. action 'edit_user_profile' needs a WordPress user object which can be taken from WP_User class.
    2. action 'edit_user_profile_update' needs the user id.

  6. nicolaelvin
    Posted 3 years ago #

    ahh ok then. I am simply using the below which does display the avatar.

    $myAv = new simple_local_avatars();

    But what isn't working is the uploading, I guess this is because I am not using the edit_user_profile_update() function. My form posts back to the same page, as the updates for all the other fielda are on the same page. So how do I update the avatar on pressing submit. What code do I need in my page? For the other fields I have for example:

    if ( !empty( $_POST['url'] ) )
            update_usermeta( $current_user->id, 'user_url', esc_url( $_POST['url'] ) );
  7. Florence
    Posted 3 years ago #

    I have the same problem. There needs to be a "save picture" button or something. How do I create it?

  8. Florence
    Posted 3 years ago #

    Never mind, I figured it out!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Local Avatars
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic