Update class_core to handle multiple roles

This code (tested) now checks all roles that have been assigned to the user (instead of just the first) to see if the given value matches.