Skip to content

Commit

Permalink
Check for logged-in user
Browse files Browse the repository at this point in the history
  • Loading branch information
akirk committed Nov 23, 2023
1 parent 6bc87cb commit 53b30f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-friends.php
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ public static function has_required_privileges() {
}

public static function is_main_user() {
return get_current_user_id() === self::get_main_friend_user_id();
return is_user_logged_in() && get_current_user_id() === self::get_main_friend_user_id();
}

/**
Expand Down

0 comments on commit 53b30f0

Please sign in to comment.