No action for the collection of a commission or compensation earned by any person as a qualifying broker or an associate broker required to be licensed under the provisions of N.M. Stat. Ann. Chapter 61, Article 29 shall be maintained in the courts of the state unless such person was a duly licensed qualifying broker or associate broker at the time the alleged cause of action arose. In any event, suit against a member of the public as distinguished from any person licensed under N.M. Stat. Ann. Chapter 61, Article 29 shall be maintained only in the name of the qualifying broker.