Accessing the Admin Panel in the Source Code

Hi all!

I wonder if anyone can help me locate where the User Info part of the Admin Panel is located in the Discourse Source Code. I need to make an edit to the Source Code that will hide User IP Addresses when a Moderator or Admin views their Profile from the Admin Panel but I have no idea where I can find the code that relates to this.

Any help would be hugely appreciated.

Thank you all in advance!

Hi, welcome! :wave:

Do you mean here?

If so, it should be here:

For some reason I still cannot locate it based on what you have given me.

But yes, that is exactly what I meant.

I eventually managed to find this, but for some unknown reason, after deleting those lines of Code and restarting the VPS, the IPs still show up?

Editing the Discourse source code isn’t the recommended way to make changes to Discourse. I think you are going to have to find a way to make the change in a plugin.

What happened when you restarted Discourse will depend on how you restarted it. If you ran ./launcher rebuild app, then the changes you made will have been overwritten from the Discourse base image. If you ran ./launcher start app, it may be that starting the app isn’t enough to get Discourse to recompile the edited handlebars template.

Do you really need to prevent moderators and admins from viewing user’s IP addresses? There are a few requests on this site to add a setting that prevents moderators from viewing IP address. I’m not aware of other sites wanting to prevent admins from viewing IP addresses.


I wanted to prevent Moderators from viewing the IP Addresses as my community is not going to become larger than maybe 100 Users and some of them are upset over the fact that IP Addresses are collected (I’ve already explained every website collects their IP and some sell it). So I decided to attempt to remove it completely however that has not yet worked.


Instead of trying to hide IP addresses from moderators, maybe you could just use category moderators to handle the site’s moderation. That way only admins would be able to view IP addresses. Details about Category moderation are here:

There’s a feature request about hiding IP addresses from moderators here: Option to hide IP addresses from moderators.


If there are trust issues between your community and the moderator team then you will need to solve those in a non-technical way, not work around them with technology. These kind of things tend to blow up in another fashion sooner or later.