Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Harald Ulriksen 207 posts 249 karma points
    Aug 26, 2010 @ 21:31
    Harald Ulriksen
    0

    Multiple member groups

    There seems to be an error where only the first of the filtered grupes is used.

    In FilteredMemberPickerDataType.cs the filter seems to be applied, but it only use the first value.

     

     

     

    //- Add the filters

     

     

    if (filters.Length == 1)

    {

    sb.Append(

     

    "(cmsMember2MemberGroup.MemberGroup = " + filters[0] + ")");

    }

     

     

    else if (filters.Length > 1)

    {

     

     

    foreach (string s in filters)

    {

    sb.Append(

     

    "(cmsMember2MemberGroup.MemberGroup = " + filters[0] + ") OR ");

    }

     

     

    //- Remove the trailing OR

    sb.Remove(sb.Length - 3, 3);

    }

     

    suggest filters[0] in the foreach loop is changed to s. or something like this

    //- Add the filters

     

     

    if (filters.Length > 0)

    {

     

     

    foreach (string s in filters)

    sb.Append(

     

    "(cmsMember2MemberGroup.MemberGroup = " + s + ") OR ");

     

     

    //- Remove the trailing OR

    sb.Remove(sb.Length - 3, 3);

    }


    Cheers,
    Harald

Please Sign in or register to post replies

Write your reply to:

Draft