1

I have a D7 blog site that I've migrated from a D6 version, and one of the changes was to use an Entity Reference field (field_source referencing the user entity) for the author names so we could handle cases where one piece of content could have multiple authors. One of the nice things about D7 is that it is much easier to add custom content to user profiles, so we can just use and modify the core user profiles to display an author's content instead of having to create a separate author content type like we did in D6.

In order to keep all author names associated with their content, I migrated all of the user accounts for those that have written posts in the past and associated their content with the D7 user account (via field_source). However, I don't want some of the older user accounts to be active, so they are blocked.

This causes a problem for anon users (which are the vast majority of users that will be accessing the site), in two ways:

  1. They can't see all the user's content on their profile page

  2. Even weirder, when listing content in a generic views page display that has the main image, title, author name, date, and summary, the author name does not show for anonymous users, but it does for admins. When looking at the view preview, the name is returned, so there's obviously something after the view content is returned that is filtering the display of blocked user account names. And yes, I have the relationship and field defined properly in the view.

I've looked at the permissions, and anon users have the "view user profiles" permission, so there's obviously something else blocking the display in both cases. I don't see any intermediate perms for viewing blocked accounts other than "Bypass content access control", and I obviously don't want to give that permission to anonymous users.

Is there anything I can do to address these display issues for anonymous users other than unblocking all of the user accounts?

Thanks.

  • My solution was just to implement the Login Disable module and disable login for any non-active user account. – wonder95 Sep 24 '15 at 17:24

Your Answer

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

Browse other questions tagged or ask your own question.