Support » Plugin: Simple Local Avatars » [Plugin: Simple Local Avatars] Fix for image upload…

  • Ok, since the topics ( ) and ( ) I needed to fix the uploading image for my custom template… I used “jimzqui’s” code and then needed to tweak a few things…

    I added the following functions into the template directly within the logic that processes the form after “do_action(‘personal_options_update’)”.

    function edit_user_profile_update( $user_id ) {… }

    function avatar_delete( $user_id ) {… }

    I added the

    I couldn’t get the nonce thing to work so I changed this line (this will be a security issue)…

    if ( !isset( $_POST[ ‘_simple_local_avatar_nonce’ ] ) || !wp_verify_nonce( $_POST[ ‘_simple_local_avatar_nonce’ ], ‘simple_local_avatar_nonce’ ) ) { //security

    to this

    if ( !isset( $_POST[ ‘_simple_local_avatar_nonce’ ] ) ){ //security

    In the form I put this code…

    <th><?php echo get_avatar(intval($user_ID));?>

    <label for=”simple-local-avatar”><?php _e(‘Photo’,’cp’) ?></label></th>
    <td><input type=”file” name=”simple-local-avatar” id=”simple-local-avatar” /></td>

    Ok well it worked… good luck!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Simple Local Avatars] Fix for image upload…’ is closed to new replies.