reset_password
函数
reset_password ( $user, $new_pass )
- 参数
-
-
(WP_User)
$user
The user- Required: 是
-
(string)
$new_pass
New password for the user in plaintext- Required: 是
-
(WP_User)
- 定义位置
-
-
wp-includes/user.php
, line 3273
-
wp-includes/user.php
- 引入
- 2.5.0
- 弃用
- –
Handles resetting the user’s password.
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 ); }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。