You are here

function ajax_register_ajax_page_access in Ajax Login/Register 7.3

Check access to view ajax register pages.

1 string reference to 'ajax_register_ajax_page_access'
ajax_register_menu in ./ajax_register.module
Implements hook_menu().

File

./ajax_register.module, line 183

Code

function ajax_register_ajax_page_access($form, $type) {
  $forms = array(
    'login',
    'register',
    'password',
  );
  $types = array(
    'ajax',
    'nojs',
  );
  if (in_array($form, $forms) && in_array($type, $types) && user_is_anonymous()) {
    return TRUE;
  }
  return FALSE;
}