When a user account is blocked, the user profile can no longer be viewed. This makes sense, but is it possible to use Panels to override the user profile display to show a custom variant that has a message like "This user has closed his/her account"?

I looked through the available Selection rules, but the only one that seemed like it might work is User has permission (I tried one of the "edit content" permissions since I don't think that blocked users have permission to edit content). However, setting "not having edit permission" as a selection rule did not cause my custom variant to be displayed.

Again, what I want to do is show a message on the user profile page ("This user closed his/her account") instead of the default behavior, which is giving me a "too many redirects" error.

1 Answer 1


You could try to use the Rules module for this, using an approach that is similar to my answer to the question "How to create a redirect to point to the user's id?", in which you use values for the_old_path and the_new_path that fit your needs here, i.e.:

  1. Change all occurences of the_old_path to the path of the user profile.
  2. Change all occurences of the_new_path to the path of your custom variant.
  3. Add a Rules condition to check if the user account is blocked.
  4. Fit the message being displayed to fit your needs. If you don't want such message to appear, then just delete the line containing drupal_message in the rule.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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