'default' => ['access CiviCRM'],
'passwordReset' => ['access password resets'],
'sendPasswordReset' => ['access password resets'],
-
- 'PasswordReset' => ['access password resets'],
- 'SendPasswordReset' => ['access password resets'],
];
}
alert(ts('Please provide your username/email.'));
return;
}
- crmApi4('User', 'SendPasswordReset', { identifier: ctrl.identifier })
+ crmApi4('User', 'sendPasswordReset', { identifier: ctrl.identifier })
.then(r => {
updateAngular('busy', '');
updateAngular('resetSuccessfullySubmitted', true);
updateAngular('busy', ctrl.busy + ts('Changing...'));
updateAngular('formSubmitted', true);
// Now submit api request.
- return crmApi4('User', 'PasswordReset', {
+ return crmApi4('User', 'passwordReset', {
token: ctrl.token,
password: ctrl.newPassword,
})
$token = \Civi\Api4\Action\User\SendPasswordReset::updateToken($userID);
// Attempt to change the user's password using this token to authenticate.
- $result = User::PasswordReset(TRUE)
+ $result = User::passwordReset(TRUE)
->setToken($token)
->setPassword('fingersCrossed')
->execute();
// Should not work a 2nd time with same token.
try {
- User::PasswordReset(TRUE)
+ User::passwordReset(TRUE)
->setToken($token)
->setPassword('oooh')
->execute();