authenticate

过滤钩子


apply_filters( 'authenticate', null, $username, $password )
参数
  • (null|WP_User|WP_Error)
    $user
    WP_User if the user is authenticated.
    WP_Error or null otherwise.
    Required:
  • (string)
    $username
    Username or email address.
    Required:
  • (string)
    $password
    User password.
    Required:
定义位置
  • wp-includes/pluggable.php
    , line 614
引入
4.5.0
弃用

Filters whether a set of user login credentials are valid.

A WP_User object is returned if the credentials authenticate a user.
WP_Error or null otherwise.

$user = apply_filters( 'authenticate', null, $username, $password );