1

How can you create a view of content in a specific node type where there is an email address that will correspond with the email address of currently logged in user's email address? The content is not owned by user. This view will be used to assign relations to the user and other content with rules.

  • Contextual filters on User ID from URL. If it must be the email you may have to do some grabbing but the uid will get you there. – sareed Oct 6 '15 at 21:28
  • There is also "User ID from logged in User," But how do you grab the email from the User ID within contextual filters? This is dealing with attaching pre-registered info gathered from another site. – Kentonr Oct 6 '15 at 21:45
  • This worked for me: drupal.stackexchange.com/questions/200641/… – kjvysa Nov 3 '16 at 14:39
1

Here is the approach to provide a relationship between content and logged in user:

  1. Create a user view.
  2. Add a contextual filter on User: E-mail.
  3. Add a relationship on User: Content authored.

Now you can do rest of you functionality.

0

Since the content is not authored by the user, I needed to create a relation from the user to the content. The content has a matching email. I was able to achieve a list of content filtered by a user's email through Rules, VBO, and passing the email address as contextual argument. Then rules can apply the relation to the content.

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.