On Drupal 5 the CCK "user reference" field type allowed to select "currently logged in user" as value on "User reference" filter in views.
Actually, in Drupal 6, with the new CCK and the new views module, you cannot do this anymore.

Usecase example:
- node type with user reference field
- views for displaying nodes with user reference field matching currently logged user

thanks for the attention.

Comments

karens’s picture

Status: Active » Fixed

CCK doesn't do anything with 'currently logged in user', that's a Views filter. If you don't think it's working right, that would be a Views issue.

achimbode’s picture

If I understand you right, you look for the listbox entry 'currently logged in user' from the Views Module of Drupal Version 5.x in 6.x.
We had this problem, too. That is why I came across this posting.

The solution is pretty easy once you managed to forget the former edit page:

  • Create a view
  • In the "edit view" view go:
    • Filter
    • add ("+")
    • scroll down
    • choose Groups: User
    • check User:Current
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

sillygwailo’s picture

Project: Content Construction Kit (CCK) » Views (for Drupal 7)
Component: Views Integration » Documentation
Category: bug » support
radj’s picture

This doesn't seem to work if the User Reference field is set to have more than 1 value.

redben’s picture

Hi

I need the same thing. You say it was there in drupal 5 version ? That's a pity its nomore there...
Any chance we see this feature back in ?

redben’s picture

Status: Closed (fixed) » Fixed

Yes i found it radj !!
Here is what you need to do :
You have a content type say... Car
In content type Car you have a user reference field car_maintainer
If you want your car maintainer users to have a view with all the cars they maintain you do the following

- Create the view and add the fields
- Add filter content type = Car
- In the arguments pane add argument :

  1. select "Content" in the Group dropdwon box
  2. check "Content : maintainer" or whatever your user reference field is.
  3. when the pane "Action to take if argument is not present" select "provide default argument"
  4. then in the "Provide default argument options" that shows up, select "user id from logged in user"
  5. You can further customise this by restricting users by role (scroll down a bit to reach that part)

For me it works like a charm !

Hope this helps

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ashiwebi’s picture

I have one doubt on this.

I want to show all the posts of current logged in user with views.

emman31’s picture

Status: Closed (fixed) » Active

I post here, because I think this is what I want.

I'd like to have an exposed filter on a user reference field to allow filtering on the current user.
My exposed filter would have only 2 possible values : 'Me' and 'All'

Without the "currently logged in user", I think it's not possible to do...

let me know if I'm wrong !

kars-t’s picture

Status: Active » Fixed

Hi

I am closing this issue to clean up the issue queue. Feel free to reopen the issue if there is new information and the problem still resides. If not please make sure you close your issues that you don't need any more.

Maybe you can get support from the local user group. Please take a look at this list at groups.drupal.org.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.