Index: sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-directory-compat.php
===================================================================
--- sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-directory-compat.php	(revision 5356)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-directory-compat.php	(working copy)
@@ -837,10 +837,11 @@
 		if ( ! $authors ) {
 
 			if ( $this->compat() == 'theme' ) {
-				$theme = $this->theme;
-				$author = get_user_by( 'id', $this->theme->post_author );
+				$theme = $this->get_object( $slug );
+				$author = get_user_by( 'id', $theme->post_author );
 				$authors = array( $author->user_nicename );
 			} else {
+				$plugin = $this->get_object( $slug );
 				$prefix = $wpdb->base_prefix . WPORG_PLUGIN_DIRECTORY_BLOGID . '_';
 				// Note: Intentionally not considering posts of 'plugin' post_type with
 				// 'post_author' matching this author because the field only relates to
@@ -852,7 +853,7 @@
 					 LEFT JOIN {$prefix}term_taxonomy AS tt ON tt.term_id = t.term_id
 					 LEFT JOIN {$prefix}term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id 
 					 WHERE tt.taxonomy = 'plugin_committers' AND tr.object_id = %d",
-					 $this->plugin->ID
+					 $plugin->ID
 				) );
 			}
 
@@ -879,6 +880,7 @@
 		$cache_group = $this->compat() . '-contributors-slugs';
 		$contributors = wp_cache_get( $cache_key, $cache_group );
 		if ( ! $contributors ) {
+			$plugin = $this->get_object( $slug );
 			$prefix = $wpdb->base_prefix . WPORG_PLUGIN_DIRECTORY_BLOGID . '_';
 			$contributors = $wpdb->get_col( $wpdb->prepare(
 				"SELECT slug
@@ -886,7 +888,7 @@
 				 LEFT JOIN {$prefix}term_taxonomy AS tt ON tt.term_id = t.term_id
 				 LEFT JOIN {$prefix}term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id 
 				 WHERE tt.taxonomy = 'plugin_contributors' AND tr.object_id = %d",
-				 $this->plugin->ID
+				 $plugin->ID
 			) );
 
 			wp_cache_set( $cache_key, $contributors, $cache_group, HOUR_IN_SECONDS );
Index: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-user-badges/inc/class-plugin.php
===================================================================
--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-user-badges/inc/class-plugin.php	(revision 5356)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-user-badges/inc/class-plugin.php	(working copy)
@@ -347,11 +347,16 @@
 	 * @return bool                 True if user is an author, false otherwise.
 	 */
 	public function is_user_author( $user_nicename, $type, $slug ) {
-		if ( 'plugin' === $type ) {
-			$compat = class_exists( '\WordPressdotorg\Forums\Plugin' ) ? \WordPressdotorg\Forums\Plugin::get_instance()->plugins : '';
+		if ( class_exists( '\WordPressdotorg\Forums\Plugin' ) ) {
+			if ( 'plugin' === $type ) {
+				$compat = \WordPressdotorg\Forums\Plugin::get_instance()->plugins;
+			} else {
+				$compat = \WordPressdotorg\Forums\Plugin::get_instance()->themes;
+			}
 		} else {
-			$compat = class_exists( '\WordPressdotorg\Forums\Theme' ) ? \WordPressdotorg\Forums\Theme::get_instance()->themes : '';
+			$compat = null;
 		}
+
 		$authors = $compat ? $compat->get_authors( $slug ) : array();
 
 		return $authors && in_array( $user_nicename, $authors );
@@ -369,11 +374,16 @@
 	 * @return bool                 True if user is a contributor, false otherwise.
 	 */
 	public function is_user_contributor( $user_nicename, $type, $slug ) {
-		if ( 'plugin' === $type ) {
-			$compat = class_exists( '\WordPressdotorg\Forums\Plugin' ) ? \WordPressdotorg\Forums\Plugin::get_instance()->plugins : '';
+		if ( class_exists( '\WordPressdotorg\Forums\Plugin' ) ) {
+			if ( 'plugin' === $type ) {
+				$compat = \WordPressdotorg\Forums\Plugin::get_instance()->plugins;
+			} else {
+				$compat = \WordPressdotorg\Forums\Plugin::get_instance()->themes;
+			}
 		} else {
-			$compat = class_exists( '\WordPressdotorg\Forums\Theme' ) ? \WordPressdotorg\Forums\Theme::get_instance()->themes : '';
+			$compat = null;
 		}
+
 		$contributors = $compat ? $compat->get_contributors( $slug ) : array();
 
 		return $contributors && in_array( $user_nicename, $contributors );
