users_can_register_signup_filter() WordPress Function

The users_can_register_signup_filter() function allows you to filter whether a user can register on your site. This can be useful if you want to allow registration only for certain users, or if you want to disable registration altogether.

users_can_register_signup_filter() #

Determines whether users can self-register, based on Network settings.


Return

(bool)


Top ↑

Source

File: wp-includes/ms-functions.php

function users_can_register_signup_filter() {
	$registration = get_site_option( 'registration' );
	return ( 'all' === $registration || 'user' === $registration );
}


Top ↑

Changelog

Changelog
VersionDescription
MU (3.0.0)Introduced.

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