You are here

function user_restrictions_user_register_form_validate in User restrictions 7

Form validation handler for user_register_form().

See also

user_register_form()

1 string reference to 'user_restrictions_user_register_form_validate'
user_restrictions_form_user_register_form_alter in ./user_restrictions.module
Implements hook_form_FORM_ID_alter() for user_register_form().

File

./user_restrictions.module, line 192
Specifies rules for restricting the data users can set for their accounts.

Code

function user_restrictions_user_register_form_validate($form, &$form_state) {
  if (user_access('bypass user restriction rules')) {
    return;
  }
  $error = UserRestrictions::check($form_state, 'register');
  if ($error['message']) {
    form_set_error($error['field'], $error['message']);
  }
}