How to create a view displaying a list of users who have logged-in user's preferences How does one create a view that filters users so as to display those with preferences of the logged-in user (the one viewing them)? I'm using Drupal 7.34, Views 3.

E.g. A user selects a preference on sign up, such as "i'm interested in a man". How do you create a view that will show this user a list of users who selected "I'm a man" on their own signups. Think of it as matchmaking.

I came across this discussion but didnt figure out this comment. All the articles out there don't seem to address this clearly.

I'm certain there is a contextual filter move I'm missing. Please help.
I had same issue but solved by using this custom code in view. I was using profile2 module for registration so as per sex field, I was done this :

global $user;
$profiles = profile2_load_by_user($user);
foreach ($profiles as $profile) {
  if ($items = field_get_items('profile2', $profile, 'field_seeking')) {
    break;
  }
}
   return $items[0]['value'];


Please check my Post HERE.

As per my post I was do this :

global $user;
    $profiles = profile2_load_by_user($user);
    foreach ($profiles as $profile)
    {
        if ($items = field_get_items('profile2', $profile, 'field_sex'))
      {
            break;
          }
    }

    $i_am=$items[0]['value'];

    if($i_am=='sdmale' || $i_am=='sbmale')
    {

    $looking='smfemale+sbfemale';
    }

    if($i_am=='smfemale' || $i_am=='sbfemale')
    {
    $looking='sdmale+sbmale';
    }
    return $looking;