function notifications_access_user_add in Notifications 6.2
Same name and namespace in other branches
- 6.4 notifications.module \notifications_access_user_add()
- 6 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
2 calls to notifications_access_user_add()
- 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 229 - 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;
}
}
}