title: CAML Query using "Membership Type='CurrentUserGroups'" returns no results
body: <p>I have the following CAML query to programmatically filter a list:</p>
  
  <p><code>&lt;Query&gt;
      &lt;Where&gt;
        &lt;And&gt;
           &lt;Geq&gt;&lt;FieldRef Name='notificationExpires' /&gt;&lt;Value IncludeTimeValue='TRUE' Type='DateTime'&gt;2011-03-30T00:00:00Z&lt;/Value&gt;&lt;/Geq&gt; 
           &lt;Or&gt;
              &lt;Membership Type='CurrentUserGroups'&gt;&lt;FieldRef Name='notificationTargetRoles'/&gt;&lt;/Membership&gt;
              &lt;Contains&gt;&lt;FieldRef Name='notificationTargetRoles'/&gt;&lt;Value Type='User'&gt;MyDomain\administrator&lt;/Value&gt;&lt;/Contains&gt;
           &lt;/Or&gt;
        &lt;/And&gt;
     &lt;/Where&gt;
  &lt;/Query&gt;</code></p>
  
  <p>When I execute this exact same query (running under the same account) in the U2U CAML Query Builder I get filtered users, groups and dates.
  When apply exact the same filter in code, the Groups do not appear in the results.</p>
  
  <p>What can be the reason that the group filter (CurrentGroups) does not return any results?</p>
  
  <p>The code for applying the filter is:</p>
  
  <pre><code> SPListItemCollection items = null;
           SPSecurity.RunWithElevatedPrivileges(delegate()
           {
               using (SPSite elevatedSite = new SPSite(theSiteName))
               {
                   using (SPWeb elevatedWeb = elevatedSite.OpenWeb())
                   {
                       SPList alertList = elevatedWeb.Lists[theListName];
                       SPQuery query = new SPQuery();
  
  
                       query.Query = "&lt;Where&gt;&lt;And&gt;&lt;Geq&gt;&lt;FieldRef Name='notificationExpires' /&gt;&lt;Value IncludeTimeValue='TRUE' Type='DateTime'&gt;2011-03-30T00:00:00Z&lt;/Value&gt;&lt;/Geq&gt; &lt;Or&gt;&lt;Membership Type='CurrentUserGroups'&gt;&lt;FieldRef Name='notificationTargetRoles'/&gt;&lt;/Membership&gt;&lt;Contains&gt;&lt;FieldRef Name='notificationTargetRoles'/&gt;&lt;Value Type='User'&gt;BSFLMK\administrator&lt;/Value&gt;&lt;/Contains&gt;&lt;/Or&gt;&lt;/And&gt;&lt;/Where&gt;";
  
                       items = alertList.GetItems(query);
                   }
               }
           });
  </code></pre>