Skip to content
Snippets Groups Projects
Commit 0702a4b7 authored by Project Update Bot's avatar Project Update Bot Committed by Mark Shropshire
Browse files

Issue #3297579 by the_g_bomb, Project Update Bot, yashingole: Automated Drupal...

Issue #3297579 by the_g_bomb, Project Update Bot, yashingole: Automated Drupal 10 compatibility fixes
parent 2c946722
Branches 2.x
No related merge requests found
......@@ -27,7 +27,7 @@ function mass_pwreset_batch_process($data, &$context) {
// Reset user password.
if (isset($data['uids'][$i])) {
$user = User::load($data['uids'][$i]);
$user->setPassword(user_password(40));
$user->setPassword(\Drupal::service('password_generator')->generate(40));
$user->save();
// Update status message.
......
......@@ -2,5 +2,5 @@ name: Mass Password Reset
description: Reset all user accounts!
package: Authentication
type: module
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^9.3 || ^10
configure: TODO
......@@ -23,7 +23,7 @@ function mass_pwreset_multiple_reset(array $data) {
'init_message' => t('Multiple password reset in progress.'),
'progress_message' => t('Password reset batch in progress.'),
'error_message' => t('There was an error in the password reset batch.'),
'file' => drupal_get_path('module', 'mass_pwreset') . '/mass_pwreset.batch.inc',
'file' => \Drupal::service('extension.list.module')->getPath('mass_pwreset') . '/mass_pwreset.batch.inc',
];
// Set batch via form submit handler.
batch_set($batch);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment