Restricting taxonomy listings by author using VIEWS and taxonomy redirect

    I have been looking for a maintainable way to limit the taxonomy lists produced by the Drupal taxonomy module by the autor. In a project that seems to categorise nodes by the author to create a paradigm were the user experience is dictated by the profile page that a viewer last visited, restricting taxonomy lists by author supports this UX paradigm.

    Requirements
    My main requirements was to create a maintainable setup that would not require intervention as new taxonomy terms are created in a given vocabulary.

    Solution
    The solution that worked for me without much coding is a combination of the Taxonomy Redirect module, and a simple VIEWS query (ofcourse you need to setuup VIEW).

    1. Created a Drupal VIEW and configured it to create a page view with and list nodes as teasers
    2. Created two arguments:Taxonomy ID under a given taxonomy vocabulary that I selected for this exercise, and the UId of the node author
    3. Since in the setup I had, I was storing the UID of the last profile page visited by the site visitor, I was able to easily call that from the session and write it into the VIEW argument using the code
      $args[1]=$SESSION['profile_uid'];
      return $args;
    4. Installed the Taxonomy Redirect Module and pointed it to the path of the above created VIEW with !tid as the first argument in the path (e.g created_view/!tid) the !tid being the first view.
    5. $args[0], the first argument was the taxonomy term ID already in the URL created_view/!tid


    This setup ensures that any taxonomy terms created under this vocabulary will present a list of current nodes classified into that erm, but also restricted by a required author.