allow_password_reset

過濾鉤子
apply_filters( 'allow_password_reset', $allow, $user->ID )
引數
  • (bool) $allow Whether to allow the password to be reset. Default true.
    Required:
  • (int) $user_id The ID of the user attempting to reset a password.
    Required:
定義位置
相關勾子
password_resetafter_password_resetvalidate_password_resetlostpassword_redirectlostpassword_post
相關方法
get_password_reset_keywp_ajax_send_password_resetcheck_password_reset_keypost_password_requiredwp_lostpassword_urldefault_password_nag
引入
2.7.0
棄用
-

allow_password_reset是一個過濾器,允許你修改使用者是否可以重置他們的密碼。預設情況下,使用者被允許重置他們的密碼,但這個過濾器可以用來改變這一點。

過濾是否允許重置密碼。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$allow = apply_filters( 'allow_password_reset', $allow, $user->ID );
$allow = apply_filters( 'allow_password_reset', $allow, $user->ID );
$allow = apply_filters( 'allow_password_reset', $allow, $user->ID );

常見問題

FAQs
檢視更多 >