function notifications_access_subscribe in Notifications 6.4
Same name and namespace in other branches
- 6 notifications.module \notifications_access_subscribe()
- 6.2 notifications.module \notifications_access_subscribe()
- 6.3 notifications.module \notifications_access_subscribe()
- 7 notifications.module \notifications_access_subscribe()
Menu access callback for subscribe links
More access checking depending on subscription type will be done at the destination page
1 call to notifications_access_subscribe()
- notifications_ui_user_access in notifications_ui/
notifications_ui.module - Check user access to notifications_ui
1 string reference to 'notifications_access_subscribe'
- notifications_menu in ./
notifications.module - Implementation of hook_menu().
File
- ./
notifications.module, line 319 - Notifications module
Code
function notifications_access_subscribe($account) {
global $user;
if (!$account->uid && !$user->uid) {
return notifications_access_anonymous();
}
if (user_access('administer notifications') || user_access('manage all subscriptions')) {
return TRUE;
}
return $account && $account->uid && $user->uid == $account->uid && user_access('maintain own subscriptions');
}