Support » Plugin: Simple Local Avatars » [Plugin: Simple Local Avatars] Avatar doesnt get saved in fornt end

Viewing 7 replies - 1 through 7 (of 7 total)
  • same bug!

    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">

    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.

    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.

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

    <?php
    $myAv = new simple_local_avatars();
    $myAv->edit_user_profile($current_user);
    ?>

    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'] ) );

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

    Never mind, I figured it out!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Simple Local Avatars] Avatar doesnt get saved in fornt end’ is closed to new replies.