By sak2109 on
I have created a block using the drupal 6.4 views module. In the block i want to display the pictures of the recently joined members but i want to filter that display to leave out those users who have not yet activated their accounts and who have not uploaded a picture.
The views module gives a filter capability that allows me to add user =active condition in the where clause. But how do i check for the condition that user has uploaded a picture in the profile too. None of the variables provided through the "views filter" allow me to add this check
any help will be greatly appreciated
Comments
You could create a custom
You could create a custom filter for what you need. Look at this http://drupal.org/node/99794 and create a (baby) module that would implement the hook_views_tables()
Or you could alternately add php code into your block to create a view object > write the query yourself > and then just call views_theme() with the right parameters. refer: http://drupal.org/node/180924
thanks .. will try option 1
thanks .. will try option 1
If you should decide to use
If you should decide to use the 1st option above, then it is a good idea to use != as the operator so that the query gets build something like
"..... AND WHERE user.picture != '' ..............."