Skip to content

Commit

Permalink
Update data-request.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ptibogxiv committed Oct 31, 2024
1 parent 1bff261 commit 7325e6b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions functions/data-request.php
Original file line number Diff line number Diff line change
Expand Up @@ -649,12 +649,12 @@ function dolirpw_request(){

if ( (!isset($_POST["key"]) && !isset($_POST["login"]) && isset($pwd0) && !empty($pwd0) && wp_check_password( $pwd0, $current_user->user_pass, $current_user->ID ) && $doliValidatePassword ) || (isset($_POST["key"]) && isset($_POST["login"]) && ($pwd1 == $pwd2) && $doliValidatePassword ) ) {

if ( doliconnector($current_user, 'fk_user') > '0' ) {
$data = [
'pass' => $pwd1
];
$object = callDoliApi("PUT", "/users/".doliconnector($current_user, 'fk_user'), $data, dolidelay('thirdparty'));
}
if ( doliconnector($current_user, 'fk_user') > '0' ) {
$data = [
'pass' => $pwd1
];
$object = callDoliApi("PUT", "/users/".doliconnector($current_user, 'fk_user'), $data, dolidelay('thirdparty'));
}

if ( !isset($object) || ( isset($object) && !isset($object->error) ) ) {
wp_set_password($pwd1, $current_user->ID);
Expand Down

0 comments on commit 7325e6b

Please sign in to comment.