function content_profile_page_access in Content Profile 6
2 string references to 'content_profile_page_access'
- content_profile_menu in ./
content_profile.module - Implementation of hook_menu().
- content_profile_menu_alter in ./
content_profile.module - Implementation of hook_menu_alter(). Take over menu items generated by the user module for our categories.
File
- ./
content_profile.module, line 80
Code
function content_profile_page_access($type, $account) {
if ($node = content_profile_load($type, $account->uid)) {
return node_access('update', $node);
}
// Else user may view the page when they are going to create their own profile
// or have permission to create it for others.
global $user;
if ($user->uid == $account->uid || user_access('administer nodes')) {
return node_access('create', $type);
}
return FALSE;
}