wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi
reset_password › WordPress Function
Da2.5.0
Deprecaton/a
› reset_password ( $user, $new_pass )
Parametri: (2) |
|
Definito a: |
|
Codex: |
Handles resetting the user's password.
Funzioni correlate: wp_set_password, retrieve_password, the_post_password, wp_generate_password, wp_hash_password
Sorgenti
function reset_password( $user, $new_pass ) { /** * Fires before the user's password is reset. * * @since 1.5.0 * * @param WP_User $user The user. * @param string $new_pass New user password. */ do_action( 'password_reset', $user, $new_pass ); wp_set_password( $new_pass, $user->ID ); update_user_meta( $user->ID, 'default_password_nag', false ); /** * Fires after the user's password is reset. * * @since 4.4.0 * * @param WP_User $user The user. * @param string $new_pass New user password. */ do_action( 'after_password_reset', $user, $new_pass ); }