functions.php: add hook to prevent multisite signup
This commit is contained in:
parent
ba1254a768
commit
0a060e1c8a
@ -448,3 +448,11 @@ function user_registration_filter($user_id, $email) {
|
|||||||
return $user_id;
|
return $user_id;
|
||||||
}
|
}
|
||||||
add_filter('email_exists', 'user_registration_filter', 10, 2);
|
add_filter('email_exists', 'user_registration_filter', 10, 2);
|
||||||
|
|
||||||
|
/* Security: prevent multisite signup */
|
||||||
|
function prevent_multisite_signup()
|
||||||
|
{
|
||||||
|
wp_redirect( site_url() );
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
add_action( 'signup_header', 'prevent_multisite_signup' );
|
||||||
|
Loading…
Reference in New Issue
Block a user