For example, consider a dating website. Each user has an Age stored in their profile. They also have a Max age and Min age, which are the maximum and minimum ages of people they hope to receive interest from (in other words, users with ages outside the range Min age - Max age should not be allowed to contact that user).
How can I build a page in Views that filters the results for the current user to show other users that both meet the current user's age range and for which the current user meets their age ranges?
In other words, I need to somehow filter the results like this:
- Only show users that have ages within the range of the current user's Max age and Min age (example: current user is 20 and wants to see users from 18-25; filter to show users from 18-25)
- Only show users for which the current user has an age that falls within the range of their Max age and Min age (example: current user is 20 and wants to see users from 18-25; filter to show users who want to receive messages from someone age 20)
Is this something I can somehow do with contextual filters, or do I need to write my own custom filter?