Skip to content

Commit

Permalink
feat(WebService) permit changing password without old password: noche…
Browse files Browse the repository at this point in the history
…ck_old_password
  • Loading branch information
joebordes committed Jun 2, 2023
1 parent 011a7f8 commit e767906
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/Webservices/ChangePassword.php
Expand Up @@ -38,7 +38,7 @@ function vtws_changePassword($id, $oldPassword, $newPassword, $confirmPassword,
VTWS_PreserveGlobal::flush();
throw new WebServiceException(WebServiceErrorCode::$INVALIDOLDPASSWORD, vtws_getWebserviceTranslatedString('LBL_'.WebServiceErrorCode::$INVALIDOLDPASSWORD));
}
if (!$user->verifyPassword($oldPassword)) {
if ($oldPassword!='nocheck_old_password' && !$user->verifyPassword($oldPassword)) {
VTWS_PreserveGlobal::flush();
throw new WebServiceException(WebServiceErrorCode::$INVALIDOLDPASSWORD, vtws_getWebserviceTranslatedString('LBL_'.WebServiceErrorCode::$INVALIDOLDPASSWORD));
}
Expand Down

0 comments on commit e767906

Please sign in to comment.