Changeset 56150
- Timestamp:
- 07/06/2023 12:45:45 PM (13 months ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-users-list-table.php
r55971 r56150 503 503 if ( get_current_user_id() !== $user_object->ID 504 504 && current_user_can( 'edit_user', $user_object->ID ) 505 505 506 ) { 506 507 $actions['resetpassword'] = "<a class='resetpassword' href='" . wp_nonce_url( "users.php?action=resetpassword&users=$user_object->ID", 'bulk-users' ) . "'>" . __( 'Send password reset' ) . '</a>'; -
trunk/src/wp-admin/user-edit.php
r56008 r56150 682 682 683 683 <?php // Allow admins to send reset password link. ?> 684 <?php if ( ! IS_PROFILE_PAGE ) : ?>684 <?php if ( ! IS_PROFILE_PAGE ) : ?> 685 685 <tr class="user-generate-reset-link-wrap hide-if-no-js"> 686 686 <th><?php _e( 'Password Reset' ); ?></th> -
trunk/src/wp-includes/user.php
r56071 r56150 2898 2898 do_action( 'retrieve_password', $user->user_login ); 2899 2899 2900 $allow = true; 2901 if ( is_multisite() && is_user_spammy( $user ) ) { 2902 $allow = false; 2903 } 2904 2905 /** 2906 * Filters whether to allow a password to be reset. 2907 * 2908 * @since 2.7.0 2909 * 2910 * @param bool $allow Whether to allow the password to be reset. Default true. 2911 * @param int $user_id The ID of the user attempting to reset a password. 2912 */ 2913 $allow = apply_filters( 'allow_password_reset', $allow, $user->ID ); 2914 2915 if ( ! $allow ) { 2900 $password_reset_allowed = wp_is_password_reset_allowed_for_user( $user ); 2901 if ( ! $password_reset_allowed ) { 2916 2902 return new WP_Error( 'no_password_reset', __( 'Password reset is not allowed for this user' ) ); 2917 } elseif ( is_wp_error( $ allow) ) {2918 return $ allow;2903 } elseif ( is_wp_error( $ ) ) { 2904 return $; 2919 2905 } 2920 2906 … … 5038 5024 wp_cache_set_last_changed( 'users' ); 5039 5025 } 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057
Note: See TracChangeset
for help on using the changeset viewer.