check_password WordPress Filter Hook

The check_password hook is used to validate a user's password when logging in to a WordPress site. This hook is called during the login process, after the user has entered their username and password. If the password is valid, the hook will return true. If the password is invalid, the hook will return false. This hook can be used to customise the password validation process, for example, to check for password strength or to allow users to log in with alternate credentials.

apply_filters( 'check_password', bool $check, string $password, string $hash, string|int $user_id ) #

Filters whether the plaintext password matches the encrypted password.


Parameters

$check

(bool)Whether the passwords match.

$password

(string)The plaintext password.

$hash

(string)The hashed password.

$user_id

(string|int)User ID. Can be empty.


Top ↑

Source

File: wp-includes/pluggable.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More