function notifications_ui_access_user_add in Notifications 6
Same name and namespace in other branches
- 6.4 notifications_ui/notifications_ui.module \notifications_ui_access_user_add()
- 6.2 notifications_ui/notifications_ui.module \notifications_ui_access_user_add()
- 6.3 notifications_ui/notifications_ui.module \notifications_ui_access_user_add()
- 7 notifications_ui/notifications_ui.module \notifications_ui_access_user_add()
Menu access callback: add subscription
2 calls to notifications_ui_access_user_add()
- NotificationsContentTests::testNotificationsUserPages in tests/
notifications_content.test - Check all user pages before and after enabling permissions
- notifications_ui_page_user_add in notifications_ui/
notifications_ui.pages.inc - User add subscription
1 string reference to 'notifications_ui_access_user_add'
- notifications_ui_menu in notifications_ui/
notifications_ui.module - Implementation of hook_menu()
File
- notifications_ui/
notifications_ui.module, line 83 - User Interface for subscriptions modules
Code
function notifications_ui_access_user_add($account, $type = NULL) {
// Main tab, visible only if any subscription type enabled
$check_types = $type ? array(
$type,
) : array_keys(notifications_ui_subscription_types());
foreach ($check_types as $type) {
if (notifications_ui_subscription_type($type) && notifications_ui_user_options('create') && notifications_access_user_add($account, $type)) {
return TRUE;
}
}
}