Closed (fixed)
Project:
Views (for Drupal 7)
Version:
5.x-1.6
Component:
Miscellaneous
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Oct 2007 at 22:43 UTC
Updated:
9 Jul 2008 at 14:03 UTC
I admit I'm pretty new to this. I'm looking for a way to pass the current user's UID to Views as an argument. I've been using the "me" module to jury-rig this, but it isn't working for a certain function - specifically, I want to pass the current UID as an argument through a nodereference field in a custom content type.
I've searched for some varying bits on the site here, but haven't found anything specific. Is this possible?
I appreciate any advice you folks can throw my way. Thanks!
Comments
Comment #1
merlinofchaos commentedUnder filters, "Node: Author is current user" (I think it's called something like that).
Comment #2
merlinofchaos commentedOh, I didn't read well enough.
Actually, in your case you probably want to use the PHP Argument code block.
In that block, put this:
Comment #3
phasmaphobic commentedThanks so much! This is exactly what I needed. I'm still wrapping my head around the arguments, but help like this makes it a lot easier. I appreciate it!
Comment #4
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #5
giorgio79 commentedThis was what I was looking for as well.
I wanted to get a view that displays a specific content type generated by the current logged in user...
I have not found the Node: Current logged in user option but will try the snippet...
Will test this now.
Cheers,
G