bochao welcome to Flarum!
What are you trying to customize ?
Flarum extension system is based around events and container bindings, and the ideal solution depends on what you're trying to do.
If you're trying to change the validation rules for the password, you can use a strategy similar to the one presented here https://discuss.flarum.org/d/6507-change-user-validation-rules
If you would like to replace the whole controller, a middleware could be used. But I doubt you need to go that far.