function notifications_manage_subscriptions_form_validate in Notifications 6.2
Same name and namespace in other branches
- 6.4 notifications.manage.inc \notifications_manage_subscriptions_form_validate()
- 6 notifications.manage.inc \notifications_manage_subscriptions_form_validate()
- 6.3 notifications.manage.inc \notifications_manage_subscriptions_form_validate()
- 7 notifications.manage.inc \notifications_manage_subscriptions_form_validate()
Validate notifications_admin_subscriptions form submissions.
Check if any items have been selected to perform the chosen 'Update option' on.
1 string reference to 'notifications_manage_subscriptions_form_validate'
- notifications_manage_subscriptions_form in ./
notifications.manage.inc - Administer user subscriptions
File
- ./
notifications.manage.inc, line 146 - Common functions for bulk management of subscriptions
Code
function notifications_manage_subscriptions_form_validate($form, &$form_state) {
$items = array_filter($form_state['values']['subscriptions']);
if (count($items) == 0) {
form_set_error('', t('No items selected.'));
}
else {
if (!notifications_manage_subscriptions_access(array_keys($items))) {
form_set_error('', t('You don\'t have permissions to manage these subscriptions'));
}
}
}