1
votes

I am using profile2 in order to have two separate registration forms for my site.

Each form will result in creating a user with a specific role (let's say role1 from reg form 1, role2 from reg form 2).

Now each user logs in to the site and has access to his/her registration form data only.

What I need, is a sort of admin user, who will be able: 1. to see the list of users that have registered on the website (which is done) 2. (this is the important part) on the user table, when clicking on the username, or on the edit link for a specific user, to see this user's registration form data.

I need to create a block from a view to show those data.

Any ideas?

1
Did you try to create new View and add Contextual filter - uid -> if not in url get user id from the url? And add field you'd like to see as normal View after that? - Paradoxetion
Ok, I tested it and going to apply as the answer. Let me know if it worked - Paradoxetion

1 Answers

0
votes
  1. Add new View of type User
  2. Add block display
  3. Go to contextual filters and add "User: uid".
  4. For the "WHEN THE FILTER VALUE IS NOT AVAILABLE" section check "Provide default value" and than "User Id from the URL" from the dropdown
  5. Add fields to "Fields" section as you need
  6. Save View and add block to user/* pages
  7. Test

I do hope it will help you