Alrighty. Welcome 👋.
Let’s quickly go over your idea. From what I understand, you want to create 100 users with dynamically changing passwords over time. Not to tamper with the security of a password and its basic functionality.
Roughly, here is how I would do it…
Without touching the core functionality of WordPress’s login system. However, you would likely need to source a plugin to import and export user info from WordPress’s backend in a CSV format.
Within your functions.php file for WordPress
// Get the usernames from the DB.
function get_usernames() {
global $wpdb;
$users = $wpdb->get_results("SELECT user_login FROM $wpdb->users");
$usernames = array();
foreach ($users as $user) {
$usernames[] = $user->user_login;
}
return $usernames;
}
// Build a select element with the usernames as options.
function get_usernames_dropdown() {
$usernames = get_usernames();
$dropdown = '<select name="usernames">';
foreach ($usernames as $username) {
$dropdown .= '<option value="' . $username . '">' . $username . '</option>';
}
$dropdown .= '</select>';
return $dropdown;
}
// Add the select element as shortcode.
// Usage: [usernames_dropdown]
function usernames_dropdown_shortcode() {
return get_usernames_dropdown();
}
add_shortcode('usernames_dropdown', 'usernames_dropdown_shortcode');
To round it off, you’d build your login form like any other, but instead of a text field for a username, you’d use the dropdown field instead. This IMO is the least indestructive and hacky way.