tags:

views:

24

answers:

1

Just trying to use php argument in drupal views.

I need PHP that will check on a users cck content profile field value.

True if it is 'on' false if it not 'on'

Sorry designer not coder.

A: 

In the end I did swap the content from a filed value of cck content profile type to a value within the main part of the users profile. Now I can use this php argument to validate whether a user can see a note or not using a view.

global $user;

profile_load_profile($user);

if ($user->profile_does_cashregister == 1)
return TRUE;
else 
return FALSE;

I would still like to know how to use a simular validator to filter content based on a value from a cck content profile field.

Paul