Changeset 59828 for trunk/src/wp-admin/includes/upgrade.php
- Timestamp:
- 02/17/2025 11:22:33 AM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/upgrade.php
r59754 r59828 981 981 * @ignore 982 982 * @since 1.2.0 983 * @since 6.8.0 User passwords are no longer hashed with md5. 983 984 * 984 985 * @global wpdb $wpdb WordPress database abstraction object. … … 993 994 $newname = sanitize_title( $user->user_nickname ); 994 995 $wpdb->update( $wpdb->users, array( 'user_nicename' => $newname ), array( 'ID' => $user->ID ) ); 995 }996 }997 998 $users = $wpdb->get_results( "SELECT ID, user_pass from $wpdb->users" );999 foreach ( $users as $row ) {1000 if ( ! preg_match( '/^[A-Fa-f0-9]{32}$/', $row->user_pass ) ) {1001 $wpdb->update( $wpdb->users, array( 'user_pass' => md5( $row->user_pass ) ), array( 'ID' => $row->ID ) );1002 996 } 1003 997 }
Note: See TracChangeset
for help on using the changeset viewer.