0

Setup

On my site I have created two new, different roles (say role A and B). New users get assigned one of these roles.

Using Views I have generated a user listing, i.e. a view showing all users having either of role A or B. This overview listing shows some user information, including the role that the respective user in the listing has. The role is pulled in using a field making use of user relationship: (Owner: User) User relationship: Roles

The anonymous user also has View user information permission.

Issue

The user listing view works fine, if the user viewing it is authenticated (i.e. logged in).

However, if the user is anonymous (i.e. not logged in), the role does not get displayed in the user listing view.

Desired outcome

I would like all users, including the anonymous user, to be able to view the roles in the user listing.

Question(s)

  • How can this be achieved using Views?
  • If this can not be achieved using Views, then how?
0

Ok, I figured it out with help from @Dropa. What I had to do was to build my view in a different way than I initially had it set up.

Initially I had my view built as showing fields from profile, and then I pulled in the user information through a relationship.

What I had to do was to switch it around and create the view showing fields from user. This allowed me to display the user information, including the role info that I am after. All other desired information (e.g. other information from the profile module) is then pulled in through a relationship.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.