You should check if $current_member
is empty, because get_user_by()
would return false
upon failure and a WP_User
instance/object otherwise:
if ( empty( $current_member ) ) {
return '';
}
You should check if $current_member
is empty, because get_user_by()
would return false
upon failure and a WP_User
instance/object otherwise:
if ( empty( $current_member ) ) {
return '';
}