# Override user methods

**URL:** https://meta.discourse.org/t/override-user-methods/307768
**Category:** Development
**Created:** [May 13, 2024, 3:02pm UTC](https://meta.discourse.org/t/override-user-methods/307768 "2024-05-13T15:02:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 13, 2024, 3:02pm UTC](https://meta.discourse.org/t/override-user-methods/307768/1 "2024-05-13T15:02:59Z")

</div>

I’m trying to not save user IP addresses because that’s what someone wants.

I can’t use a callback because IP addresses are saved by directly modifying the database and not through Rails ActiveRecord.

I’m trying to override the User `update_ip_address` method(s).

I’m doing this:

> <https://github.com/literatecomputing/discourse-mask-ip/blob/main/plugin.rb#L21-L26>

and this:

> <https://github.com/literatecomputing/discourse-mask-ip/blob/main/lib/mask_ip_module/override_user.rb>

But it seems like my stuff isn’t getting loaded. I can’t call `User.my_test` and when I call `User.update_ip_address` my `puts` arren’t happending.

My guess is that I have a file with the wrong name or I need to capitalize something or something else that is both trivial and impossible to figure out.
