modifyClass does not override action?

I’m working on fixing deprecations in GitHub - paviliondev/discourse-legal-tools: Tools to help with legal compliance when using Discourse and I found that the api.modifyClass('controller:user-activity', {}); does not seem to be doing anything anymore (here)

The exportUserArchive() function still exists and the initializer is being called.

I already tried changing this to a pre-initializer and move the function outside of the actions{} but to no avail.

Is there anyone who can shine some light on this?

EDIT to add, this is apparently broken in 3.1 already.

So that code turns out to be stale.

The button was moved to preferences/account UX: move data export to preferences page for new user nav (#20141) · discourse/discourse@e5f557b · GitHub and the old code was never removed from the other controller.

Well done!

@awesomerobot @david does some code here need removal?

Indeed! thanks for mentioning it… this will do it: