View for the user followed by the author of a node I have installed the Flag module, and I have a view that displays how many followers (flags) an author has. How do I reverse that query, and output how many users that author is following?
This is a little tricky, but it is very similar to the article posted at http://drupal.org/node/326580.


Create a view of users
Add the "Flags: User flag" relationship making sure that the flags are by any user.
Add the "Flags: User" relationship which will allow us to filter by the person who did the flagging.
Add a contextual filter (D7) / argument (D6) fir the "User: Uid" and make sure is uses the "Flag user" relationship.
In contextual filter / argument, select the "Provide default value" option and add the following code snippet to pass the node author as the value.


Code snippet:

if ($node = menu_get_object()) {
  return $node-&gt;uid;
}


In order to get the count it will depend on whether you are using Drupal 6 or Drupal 7, but using the Views Group By module for D6 or the internal Aggregation features of D7 should be able to get you the number of users.