better handle transfert validation
This commit is contained in:
@@ -30,11 +30,26 @@ function prof_after_form_transfert_validation_CIPF($form_id, $post_array, $form_
|
||||
|
||||
|
||||
/*
|
||||
* when transfert is validate, change card to valid
|
||||
* check if transfert was waiting, if no stop here
|
||||
* when transfert is validate,
|
||||
* - change card to valid
|
||||
* - and reset the field
|
||||
*
|
||||
*/
|
||||
$is_transfert = false;
|
||||
if (is_account_waiting_valid_CIPF($user_id)) {
|
||||
$is_transfert = true;
|
||||
}
|
||||
else if (is_account_waiting_invalid_CIPF($user_id)) {
|
||||
$is_transfert = true;
|
||||
}
|
||||
if ($is_transfert === false) {
|
||||
reset_acf_transfert_CIPF($user_id);
|
||||
return;
|
||||
}
|
||||
if (is_transfert_success_CIPF($user_id)) {
|
||||
set_account_valid_CIPF($user_id);
|
||||
reset_acf_transfert_CIPF($user_id);
|
||||
}
|
||||
}
|
||||
add_action('df_after_process', 'prof_after_form_transfert_validation_CIPF', 10, 3);
|
||||
|
||||
Reference in New Issue
Block a user