Show subscriber id in loop

You have already getting the student ID, Replace the following line of code

echo $student_info->user_id;

With

echo $student->ID;

Here’s a link!