By sergiod on
Hi!
I'm writing a module, and I've to check visibility of node, based on user's role.
I have to:
- query the db to take 100 nodes, for example
- check if the user that is on the site has the roles to view the node
- "print" a list of nodes that the user can view
Is there a function to check this?
Thanks,
Sergej
Comments
You can try the node_access
You can try the node_access api. http://api.drupal.org/api/drupal/modules--node--node.module/function/nod...
My Blog site: http://www.anupomgogoi.com
Thank's a lot!
Thank's a lot!
If you use views to query the
If you use views to query the nodes it checks the access by default.
I'm not using views now :)
I'm not using views now :)