Only allow posts by users with accounts more than two days old.

Public

Get raw version
php
  1. <?php
  2. /**
  3.  * Implement hook_node_access().
  4.  *
  5.  * Only allow posts by users with accounts more than two days old.
  6.  */
  7. function delay_node_access($node, $op, $account) {
  8. if ($op != 'create' || $node != 'article') {
  9. return NODE_ACCESS_IGNORE;
  10. }
  11. if (empty($account->created) || $account->created > (REQUEST_TIME - (48 * 3600))) {
  12. return NODE_ACCESS_DENY;
  13. }
  14. return NODE_ACCESS_IGNORE;
  15. }