Link to OSM account missing

Currently there doesn’t seem to be a link to an users OSM account anywhere I checked, that is including the users profile. Obviously is is just a matter of C&P and typing the OSM user url in, but it would be clearly more convenient to have the link somewhere easily accessible.

8 Likes

We can enable custom profile fields but I’m not sure if we can auto-populate them with info from the account or the OSM API.

@TomH and/or @Firefishy might know better in terms of oauth2 data.

1 Like

I doubt this can be easily achieved. The oauth2 basic plugin extracts a predefined set of fields from the osm api user details endpoint (discourse-oauth2-basic/plugin.rb at main · discourse/discourse-oauth2-basic · GitHub). There’s some extra fields a few lines further down in the source code, not sure if/how they work.

Besides, the osm api endpoint doesn’t return an url pointing to the user profile at this time, meaning you would have to manually assemble the proper url on discourse side based on the display_name info. After all, this might be the bigger challenge here.

By the way, neither osqa nor fluxbb have this feature atm, so it’s more of an enhancement request really and not something that is missing.

2 Likes

Adding the profile URL to the API endpoint would not be a major issue though unless Discourse could be persuaded to force update it in the way it does other fields there would be a synchronisation issue.

Andy has a plan to enable profile URLs with numeric IDs which would resolve that issue of course.

3 Likes

Regarding the extra / custom attributes: I found a pull request covering the additional logic on oauth2 basic plugin side: FEATURE: Fetch custom attributes from the user details. by romanrizzi · Pull Request #47 · discourse/discourse-oauth2-basic · GitHub

          custom_path = 'account.custom_attr'
          DiscoursePluginRegistry.register_oauth2_basic_additional_json_path(
            custom_path,
            Plugin::Instance.new
          )
1 Like

It seems other person asked long ago about extracting more fields from the oauth2, maybe we can bump that question

1 Like

Right now, my “user summary” seems to be https://community.openstreetmap.org/u/someoneelse/summary. The corresponding OSM account is https://www.openstreetmap.org/user/SomeoneElse. Is it possible to have something at the “user summary” in Discourse that links through? Preferably something automatic, but manual would do (and https://community.openstreetmap.org/u/SomeoneElse/summary does not appear to be editable - which sure just means that I’ve missed the button somewhere).

In some cases it’s “obvious” - the name will be exactly the same, but with me the account differs by case, and https://www.openstreetmap.org/user/someoneelse does not exist.

@SomeoneElse moved you to the existing conversation/request

In Preferences > Profile, I used the website field to link to my OSM Wiki profile, I would suggest until a better solution is made, people could do the same but link to their OSM Profile link if they wish.

I also utilize Markdown in the About Me box, which ends up looking like;

So there’s a couple of ways of doing it in the interim. :slightly_smiling_face:

3 Likes

2 posts were split to a new topic: Changing OSM username doesn’t change here

Case in hand: I need to check the edits of the creator ov this thread Is it allowed to add custom namespace/tags for specific project?

1 Like

Valid point, Discourse OAuth2 plugin stores the user.id returned by the OSM API, but that value isn’t exposed anywhere on the UI. Needs more research.

Ok, I found it using Who's That - OSM User Names Database

User name had some spaces in there, and Discourse would convert them into underscore characters.

Hi,

would it be possible to add some kind of link from a user’s name here in the forum to its OSM-Profile-Page (https://www.openstreetmap.org/user/<user_name>)?

What and who is affected by this issue/request?

Clicking on a user’s name here in the forum leads to its forum’s user-page. Would be nice to have also a link to his OSM-user-page.

Where on the platform does it happen?

Easiest way in my opinion is to add the link on the forum’s user-page.

How do we replicate the issue?

n/a

Expected behavior (i.e. solution)

Clicking on a user’s name here in the forum leads to his forum user-page. On this page a link to his OSM-user-page would be helpful.

Other Comments

no :slight_smile:

5 Likes