function _recovery_pass_validate_path in Recovery Password (Email New Password) 7
Same name and namespace in other branches
- 8 recovery_pass.module \_recovery_pass_validate_path()
Validates path entered by user.
1 string reference to '_recovery_pass_validate_path'
- recovery_pass_config_form in ./recovery_pass.admin.inc 
- Callback to admin/config/people/recovery-pass.
File
- ./recovery_pass.admin.inc, line 87 
- Contains configuration form for Recovery Password.
Code
function _recovery_pass_validate_path($element, &$form_state, $form) {
  if (!empty($element['#value'])) {
    $path = $element['#value'];
    if (!drupal_valid_path($path) && !drupal_lookup_path('source', $path) && !url_is_external($path)) {
      form_error($element, t('Please provide valid redirect path.'));
    }
  }
}