username_exists

過濾鉤子
apply_filters( 'username_exists', $user_id, $username )
引數
  • (int|false) $user_id The user ID associated with the username, or false if the username does not exist.
    Required:
  • (string) $username The username to check for existence.
    Required:
定義位置
相關勾子
email_existsuser_registeruser_name_labeluser_contactmethodsget_usernumposts
相關方法
username_existsterm_existsemail_existsshortcode_existstag_existspost_exists
引入
4.9.0
棄用
-

“username_exists”是一個 WordPress 函式,用於檢查使用者名稱是否存在於 WordPress 資料庫中。 此功能可用於在建立新使用者之前檢查所需使用者名稱是否已在使用中。

過濾給定的使用者名稱是否存在。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'username_exists', $user_id, $username );
return apply_filters( 'username_exists', $user_id, $username );
return apply_filters( 'username_exists', $user_id, $username );

常見問題

FAQs
檢視更多 >