fix is_single_user (#474)

This commit is contained in:
Matthias Pfefferle 2023-09-26 21:04:51 +02:00 committed by GitHub
parent 963b2795a6
commit 20d15bc95d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -429,20 +429,14 @@ function is_user_type_disabled( $type ) {
* @return boolean True if the blog is in single-user mode, false otherwise. * @return boolean True if the blog is in single-user mode, false otherwise.
*/ */
function is_single_user() { function is_single_user() {
$return = false; if (
if ( \defined( 'ACTIVITYPUB_SINGLE_USER_MODE' ) ) {
if ( ACTIVITYPUB_SINGLE_USER_MODE ) {
$return = true;
}
} elseif (
false === is_user_type_disabled( 'blog' ) && false === is_user_type_disabled( 'blog' ) &&
true === is_user_type_disabled( 'user' ) true === is_user_type_disabled( 'user' )
) { ) {
$return = true; return true;
} }
return $return; return false;
} }
if ( ! function_exists( 'get_self_link' ) ) { if ( ! function_exists( 'get_self_link' ) ) {