Skip to content

Commit 0e710d0

Browse files
authored
Try to lookup local users first (#782)
1 parent 02678ee commit 0e710d0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

integration/class-enable-mastodon-apps.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,12 @@ public static function api_account_external( $user_data, $user_id ) {
150150
return $user_data;
151151
}
152152

153+
$user = Users::get_by_various( $user_id );
154+
155+
if ( $user && ! is_wp_error( $user ) ) {
156+
return $user_data;
157+
}
158+
153159
$uri = Webfinger_Util::resolve( $user_id );
154160

155161
if ( ! $uri || is_wp_error( $uri ) ) {

0 commit comments

Comments
 (0)