This makes the HOA order illegal. The resident can then countersue for any lawyer fees etc.
Honestly I am sort-of grateful for the idiot land developer who is trying to build an apartment complex next to my small HOA. A large portion of the land is next to a stream and wildlife preserve and can't be legally developed. The idiot keeps trying to push through exceptions etc. It's kept the HOA fully distracted for the past decade. The developer almost got it through once by bribing the city council. The courts shut it down before construction could begin. All of the city council lost their seats in the next election because of it and other sketchy activities.