37-51-401. Action for compensation limited to licensed broker or salesperson. Any person engaged in the business of or acting in the capacity of a real estate broker or real estate salesperson within this state shall not be permitted to bring or maintain any action in the courts for the collection of compensation for the sale or lease or otherwise disposing of real estate without first alleging and proving that such person was a duly licensed real estate broker or real estate salesperson or authorized to act as a broker under the provisions of this chapter at the time the alleged cause of action or claim arose.