Discourse User Location

User Location plugin

Inspired by X About this Account, this plugin shows the country of registration and the country of login on user card and user profile.

:information_source: Summary shows the country of registration and the country of login on user card and user profile
:hammer_and_wrench: Repository Link https://github.com/communiteq/discourse-user-location
:open_book: Install Guide How to install plugins in Discourse
:money_bag: Sponsored by This plugin was kindly sponsored by @WorldIsMine

Features

  • Automatic Detection: Uses Discourse’s built-in IP lookup (MaxMind) to determine countries.
  • Dual Display: Shows both “Registered In” (based on registration IP) and “Located In” (based on most recent IP).
  • Smart Caching: Caches location data in a custom field to prevent constant IP lookups and latency. It only updates when the user’s IP address changes.
  • Privacy Controls: Allows admins to exempt specific user groups (e.g., Admins, Moderators) from having their location displayed.

Screenshots

User Card

User Profile

Settings

Name Description
user_location_enabled Enable or disable the plugin globally.
user_location_exempt_groups A list of groups whose members will not have their location displayed.
1 Like

Really neat plugin! I’m just wondering, is there a way for a user to opt out of this, besides making their profile private?

1 Like

The basic idea is that this can be used for fraud prevention, so users are not supposed to opt out.

However, what does work is:

  • create a group “location opt out” which users can freely join
  • add this group to the user_location_exempt_groups setting
2 Likes

1 Like