mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-18 06:03:38 +09:00
- fixed incorrect usage of the um_fetch_user function
This commit is contained in:
@@ -2169,7 +2169,9 @@ function um_get_default_avatar_uri() {
|
||||
function um_get_user_avatar_data( $user_id = '', $size = '96' ) {
|
||||
if ( empty( $user_id ) ) {
|
||||
$user_id = um_user( 'ID' );
|
||||
} else {
|
||||
}
|
||||
if ( $user_id !== um_user( 'ID' ) ) {
|
||||
$temp_id = um_user( 'ID' );
|
||||
um_fetch_user( $user_id );
|
||||
}
|
||||
|
||||
@@ -2265,6 +2267,10 @@ function um_get_user_avatar_data( $user_id = '', $size = '96' ) {
|
||||
*/
|
||||
$data['alt'] = apply_filters( "um_avatar_image_alternate_text", um_user( "display_name" ), $data );
|
||||
|
||||
if ( ! empty( $temp_id ) ) {
|
||||
um_fetch_user( $temp_id );
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user