function _auto_expire_can_user_extend in Auto Expire 7
Same name and namespace in other branches
- 5 auto_expire.module \_auto_expire_can_user_extend()
Determines if the user can extend expiry.
Parameters
$nid:
Return value
bool
1 call to _auto_expire_can_user_extend()
1 string reference to '_auto_expire_can_user_extend'
- auto_expire_menu in ./
auto_expire.module - Implements hook_menu().
File
- ./
auto_expire.module, line 95
Code
function _auto_expire_can_user_extend($nid) {
global $user;
$node = node_load($nid);
$will_expire = _auto_expire_is_expiring_node($node);
if ($will_expire) {
return user_access(EXTEND_AUTO_EXPIRE_ALL) || user_access(EXTEND_AUTO_EXPIRE_OWN) && $user->uid > 0 && $node->uid == $user->uid;
}
else {
return FALSE;
}
}