• Resolved cspit

    (@cspit)


    Our users are created using the next-ad plugin. Though this plugin is supposed to import profile pictures from AD it has issues from time to time. We started using wp-user-avatar a while back to manually upload images.

    I am attempting to automate updating our profile pictures across all services our business uses. The last one on my list is our internal wordpress sites. I can upload images to wordpress but am unable to find anyplace in the database to change which profile picture the user should use.

    Open to either direct database manipulation or creating a webhook.

Viewing 1 replies (of 1 total)
  • Thread Starter cspit

    (@cspit)

    I was able to get further with this by bringing up the form on a dedicated page (ignore some of the extra lines with the ID.).

    <?php
    $dir='/var/www/html/wordpress';
    $full="$dir/wp-load.php";
    require_once $full;
    $u=get_user_by('email', 'user@domain');
    $uid=$u->ID;
    echo get_wp_user_avatar($uid);
    echo do_shortcode('[avatar_upload user="user"]');
    ?>

    However, when I try to use any of the buttons nothing happens. My hope is to use a custom form that python sessions can interact with.

Viewing 1 replies (of 1 total)

The topic ‘Update Avatars Programatically’ is closed to new replies.