Last active
October 23, 2024 02:19
-
-
Save champsupertramp/45cc47f4d5fe67cf739b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/*** | |
*** @Get user avatar uri | |
***/ | |
// Call ultimatemember global variable | |
global $ultimatemember; | |
$user_id = 1; | |
// Set user ID | |
$ultimatemember->user->set( $user_id ); | |
// Returns current user avatar | |
$avatar_uri = um_get_avatar_uri( um_profile('profile_photo'), 32 ); | |
// Returns default UM avatar, e.g. https://ultimatemember.com/wp-content/uploads/2015/01/default_avatar.jpg | |
$default_avatar_uri = um_get_default_avatar_uri(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is working great. Thank you.
However, if a user signs up using Social Log In this doesn't show their profile photo. Even though their social media profile is showing as their profile photo in UM account. I'm not sure how to fix that.
Thank you again.