Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. function YUORMODULE_node_access($node, $op, $account) {
  2. $type = is_string($node) ? $node : $node->type;
  3.  
  4. if ($op == 'view') {
  5. global $user; // get current user
  6. // check user register date
  7. if ($user->created < $node->created) {
  8. return NODE_ACCESS_DENY;
  9. }
  10. }
  11.  
  12. // Returning nothing from this function would have the same effect.
  13. return NODE_ACCESS_IGNORE;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement