🇷🇺Russia vladimir.krupin
There is patch for the latest version
🇷🇺Russia vladimir.krupin
vladimir.krupin → created an issue.
🇷🇺Russia vladimir.krupin
@kloport this is drupal/core
🇷🇺Russia vladimir.krupin
🇷🇺Russia vladimir.krupin
#10 Now is not possible to send pass data. This case checked before temporary password generation inside the protected function ensureAccountCanRegister
if (!$this->userSettings->get('verify_mail')) {
if (empty($account->getPassword())) {
// If no e-mail verification then the user must provide a password.
throw new UnprocessableEntityHttpException('No password provided.');
}
}
else {
if (!empty($account->getPassword())) {
// If e-mail verification required then a password cannot provided.
// The password will be set when the user logs in.
throw new UnprocessableEntityHttpException('A Password cannot be specified. It will be generated on login.');
}
}
Also, \Drupal\Tests\user\Functional\RestRegisterUserTest
have related case inside testRegisterUser()
// Attempt to register with a password when e-mail verification is on.
$config->set('register', UserInterface::REGISTER_VISITORS);
$config->set('verify_mail', 1);
$config->save();
$response = $this->registerRequest('Estraven', TRUE);
$this->assertResourceErrorResponse(422, 'A Password cannot be specified. It will be generated on login.', $response);
Is this the answer to your question?
🇷🇺Russia vladimir.krupin
🇷🇺Russia vladimir.krupin
🇷🇺Russia vladimir.krupin
Required email verification should affect the user password, not the user status.
Patch attached