users_can_register_signup_filter

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

Description

users_can_register_signup_filter(); 

Usage

  1. if ( !function_exists( 'users_can_register_signup_filter' ) ) { 
  2. require_once ABSPATH . WPINC . '/ms-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = users_can_register_signup_filter(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/ms-functions.php  
  1. function users_can_register_signup_filter() { 
  2. $registration = get_site_option('registration'); 
  3. return ( $registration == 'all' || $registration == 'user' );