Hello!
I have looked everywhere for this and I was unable to find an answer.
I am trying to get the S2member membership level/lables (either on) to display by providing a user_id. Please find my code below.
$userDetails = get_userdata( $answerDetails->user_id );
if ( $userDetails ) {
$resultData[] = $userDetails->roles; // This is where the problem is. I can't seem to figure out why this isn't working or returning the membership role/level.
$resultData[] = $userDetails->display_name;
$resultData[] = $userDetails->user_email;
}