Changeset 58653
- Timestamp:
- 07/03/2024 04:08:55 PM (5 weeks ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pluggable.php
r57990 r58653 2769 2769 global $wpdb; 2770 2770 2771 2772 2771 2773 $hash = wp_hash_password( $password ); 2772 2774 $wpdb->update( … … 2785 2787 * 2786 2788 * @since 6.2.0 2787 * 2788 * @param string $password The plaintext password just set. 2789 * @param int $user_id The ID of the user whose password was just set. 2790 */ 2791 do_action( 'wp_set_password', $password, $user_id ); 2789 * @since 6.7.0 The `$old_user_data` parameter was added. 2790 * 2791 * @param string $password The plaintext password just set. 2792 * @param int $user_id The ID of the user whose password was just set. 2793 * @param WP_User $old_user_data Object containing user's data prior to update. 2794 */ 2795 do_action( 'wp_set_password', $password, $user_id, $old_user_data ); 2792 2796 } 2793 2797 endif; -
trunk/tests/phpunit/tests/auth.php
r58341 r58653 116 116 * 117 117 * @ticket 57436 118 118 119 * 119 120 * @covers ::wp_set_password … … 122 123 $action = new MockAction(); 123 124 124 add_action( 'wp_set_password', array( $action, 'action' ) ); 125 wp_set_password( 'A simple password', self::$user_id ); 125 $previous_user_pass = get_user_by( 'id', $this->user->ID )->user_pass; 126 127 add_action( 'wp_set_password', array( $action, 'action' ), 10, 3 ); 128 wp_set_password( 'A simple password', $this->user->ID ); 126 129 127 130 $this->assertSame( 1, $action->get_call_count() ); 131 132 133 128 134 } 129 135
Note: See TracChangeset
for help on using the changeset viewer.