function notifications_access_user_add in Notifications 6.4
Same name and namespace in other branches
- 6 notifications.module \notifications_access_user_add()
- 6.2 notifications.module \notifications_access_user_add()
- 6.3 notifications.module \notifications_access_user_add()
- 7 notifications.module \notifications_access_user_add()
Menu access callback, add a given subscription type
3 calls to notifications_access_user_add()
- notifications_subscription_list_form in ./
notifications.pages.inc - List form for subscriptions of the same type for a user
- notifications_ui_access_user_add in notifications_ui/
notifications_ui.module - Menu access callback: add subscription
- notifications_ui_form_alter in notifications_ui/
notifications_ui.module - Implementation of hook_form_alter()
File
- ./
notifications.module, line 263 - Notifications module
Code
function notifications_access_user_add($account = NULL, $type = NULL) {
global $user;
$account = $account ? $account : $user;
if (notifications_access_user($account)) {
if ($type && ($access = notifications_subscription_types($type, 'access'))) {
return user_access($access, $account);
}
else {
return TRUE;
}
}
}