Changeset 63065 for trunk/src/wp-includes/user.php
- Timestamp:
- 08/06/2026 03:38:58 PM (3 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/user.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/user.php
r62654 r63065 3859 3859 * @since 3.0.0 3860 3860 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific. 3861 * @since 7.0.3 Added the `$user_id` parameter, which is sent with the `personal_options_update` action. 3862 * 3863 * @param int $user_id Optional. The ID of the user whose email is being changed. Defaults to `$_POST['user_id']` if set, otherwise 0. 3861 3864 * 3862 3865 * @global WP_Error $errors WP_Error object. 3863 3866 */ 3864 function send_confirmation_on_profile_email( ) {3867 function send_confirmation_on_profile_email( $user_id = 0 ) { 3865 3868 global $errors; 3869 3870 // Maintain backward compatibility for those relying on a check based on $_POST['user_id']. 3871 if ( ! $user_id && isset( $_POST['user_id'] ) ) { 3872 $user_id = absint( $_POST['user_id'] ); 3873 } 3866 3874 3867 3875 $current_user = wp_get_current_user(); … … 3870 3878 } 3871 3879 3872 if ( $current_user->ID !== (int) $_POST['user_id']) {3880 if ( 0 === $current_user->ID || $current_user->ID !== (int) $user_id ) { 3873 3881 return false; 3874 3882 } … … 3884 3892 ); 3885 3893 3894 $_POST['email'] = addslashes( $current_user->user_email ); 3886 3895 return; 3887 3896 } … … 3897 3906 delete_user_meta( $current_user->ID, '_new_email' ); 3898 3907 3908 $_POST['email'] = addslashes( $current_user->user_email ); 3899 3909 return; 3900 3910 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)