username_exists WordPress Filter Hook

The username_exists hook is used to check whether a specified username exists. It is called when a user attempts to register or create a new account. If the username exists, the registration process is halted and an error message is displayed.

apply_filters( 'username_exists', int|false $user_id, string $username ) #

Filters whether the given username exists.


Parameters

$user_id

(int|false)The user ID associated with the username, or false if the username does not exist.

$username

(string)The username to check for existence.


Top ↑

Source

File: wp-includes/user.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.9.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
Show More