Determine LMS by get_real_user check. Change role var naming.