Created
August 15, 2020 22:10
-
-
Save trvswgnr/265387a0a70def20633a66b5e22a6c21 to your computer and use it in GitHub Desktop.
WordPress - Update All Users
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function taw_update_all_users() { | |
$users = get_users(); | |
foreach ( $users as $user ) { | |
wp_update_user( array( 'ID' => $user->ID ) ); | |
} | |
} | |
add_action('admin_init', 'taw_update_all_users'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment