By MatthijsG on
At the bottom of a View i want to print a small message for users that have the permission to edit the node. Now i can find the code if a user is logged in or not and how to print his / her role. But how can i determine with PHP if the user has the rights to EDIT the actual node?
Comments
<?php global $user;if
you can put this code into block with php input format enabled.
Tnx, but i need to enter the
Tnx, but i need to enter the role-name. I work with OG, and a node is editable or not depending on membership, not on role.
======
There are 10 people who can count binary
They who can and they who don't
http://api.drupal.org/api/fun
http://api.drupal.org/api/function/node_access/
_
$node is the fully-loaded node object - you'll need to use node_load() if you just have the node ID
Pete.