Users: remove unnecessary writes to the database for use_ssl user meta.
When checking for updates to use_ssl, use strings for the comparison values, matching the stored values. Fixes an issue where calls to wp_update_user updated the database meta value for use_ssl even when the value was missing or unchanged. Props prettyboymp, rajinsharwar, adamsilverstein, johnbillion, rayhatron, mukesh27, joemcgill. Fixes #60299. Built from https://develop.svn.wordpress.org/trunk@59216 git-svn-id: http://core.svn.wordpress.org/trunk@58609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6432da4794
commit
6f656ab4e5
|
@ -2366,7 +2366,7 @@ function wp_insert_user( $userdata ) {
|
|||
$admin_color = empty( $userdata['admin_color'] ) ? 'fresh' : $userdata['admin_color'];
|
||||
$meta['admin_color'] = preg_replace( '|[^a-z0-9 _.\-@]|i', '', $admin_color );
|
||||
|
||||
$meta['use_ssl'] = empty( $userdata['use_ssl'] ) ? 0 : (bool) $userdata['use_ssl'];
|
||||
$meta['use_ssl'] = empty( $userdata['use_ssl'] ) || ! $userdata['use_ssl'] ? '0' : '1';
|
||||
|
||||
$meta['show_admin_bar_front'] = empty( $userdata['show_admin_bar_front'] ) ? 'true' : $userdata['show_admin_bar_front'];
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.7-beta2-59215';
|
||||
$wp_version = '6.7-beta2-59216';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue