No person engaged in the business or acting in the capacity of a real estate broker or a real estate salesperson within this state shall bring or maintain any action in the courts of this state for the collection of compensation for the performance of any of the acts mentioned in this article without alleging and proving that he or she was a duly licensed real estate broker or real estate salesperson at the time the alleged cause of action arose.
Ca. Bus. and Prof'l. Code § 10136