I’m building a Drupal 7 site with a content type for events, and a view that displays a calendar of upcoming events. Events can be at one of two locations, and each user is also associated with one of the two locations. I’d like to set the calendar up so that the user only sees events for their location.
I tried doing this by creating a custom field on user profiles for location. However, I can’t figure out how to use that field to filter the events on the calendar. It doesn’t show up as an available value for contextual filters. Is there a way to do this?
Another option would be to make user location into a role, and then use role permissions to show the user one of two location-specific calendars. But this doesn’t seem like what roles were really intended for.
Could I get some advice on an efficient way to do this? Events and user accounts are created by an administrator, and users don’t need to be able to edit their location.