You are here

19 November 2015

Just a snippet that shows how to check if current user has edit permissions for some node in Drupal 7. Using node_access function like in the example you are also able to check permissions for viewing, creation and deletion.

Source code viewer
  1. $node = node_load($nid);
  2.  
  3. if (node_access('update', $node) === TRUE) {
  4. // ...
  5. }
Programming Language: PHP