issue #19224: Move reset password handling to model.