User roles not displaying

You can’t see any roles printed, because the ->roles field is an Array, so you can’t print it using echo. User print_r instead.

You also have an error in this line:

$user = get_userdata(userID);

There is no such thing like userID – it should be $userID.