ninja_forms_field_profile_pass_pre_process

The Ninja Forms ninja forms field profile pass pre process function.

Description

ninja_forms_field_profile_pass_pre_process( $field_id, $user_value ); 

Parameters (2)

0. $field_id
The field id.
1. $user_value
The user value.

Usage

  1. if ( !function_exists( 'ninja_forms_field_profile_pass_pre_process' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/fields/password.php'; 
  3.  
  4. // The field id. 
  5. $field_id = null; 
  6.  
  7. // The user value. 
  8. $user_value = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = ninja_forms_field_profile_pass_pre_process($field_id, $user_value); 
  12.  

Defined (1)

The function is defined in the following location(s).

/deprecated/includes/fields/password.php  
  1. function ninja_forms_field_profile_pass_pre_process( $field_id, $user_value ) { 
  2. global $ninja_forms_processing; 
  3.  
  4. $field_row = $ninja_forms_processing->get_field_settings( $field_id ); 
  5. $field_data = $field_row['data']; 
  6. if( isset( $field_data['reg_password'] ) AND $field_data['reg_password'] == 1 ) { 
  7. if( $user_value != $ninja_forms_processing->get_extra_value( '_pass_'.$field_id ) ) { 
  8. $ninja_forms_processing->add_error( 'mismatch-'.$field_id, __( 'Passwords do not match', 'ninja-forms' ), $field_id ); 
  9. }else{ 
  10. $ninja_forms_processing->update_extra_value( '_password', $user_value );