function botcha_form_access in BOTCHA Spam Prevention 7.3
Same name and namespace in other branches
- 6.2 botcha.module \botcha_form_access()
- 6.3 botcha.module \botcha_form_access()
- 7.2 botcha.module \botcha_form_access()
Check for restriction.
Parameters
BotchaForm $botcha_form:
1 string reference to 'botcha_form_access'
- Botcha::menu in controller/
application/ botcha.application.controller.inc - Implements hook_menu().
File
- ./
botcha.module, line 351 - BOTCHA - Spam Prevention It modifies forms by adding various botcha's.
Code
function botcha_form_access($botcha_form) {
$access = user_access('administer BOTCHA settings');
// @todo Remove hardcode.
if (in_array($botcha_form->id, array(
'update_script_selection_form',
'user_login',
'user_login_block',
)) && in_array($botcha_form
->getRecipebook(), array(
'forbidden_forms',
))) {
$access = FALSE;
}
return $access;
}