From 20d15bc95db840b2af3acdc63ee995a4fb29923d Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Tue, 26 Sep 2023 21:04:51 +0200 Subject: [PATCH] fix `is_single_user` (#474) --- includes/functions.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index cafe9a4..7e6265f 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -429,20 +429,14 @@ function is_user_type_disabled( $type ) { * @return boolean True if the blog is in single-user mode, false otherwise. */ function is_single_user() { - $return = false; - - if ( \defined( 'ACTIVITYPUB_SINGLE_USER_MODE' ) ) { - if ( ACTIVITYPUB_SINGLE_USER_MODE ) { - $return = true; - } - } elseif ( + if ( false === is_user_type_disabled( 'blog' ) && true === is_user_type_disabled( 'user' ) ) { - $return = true; + return true; } - return $return; + return false; } if ( ! function_exists( 'get_self_link' ) ) {