No person engaged in the business or acting in the capacity of a licensed broker or salesman 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 was a duly licensed broker or licensed salesman at the time the alleged cause of action arose.
Ca. Harb. and Nav. Code § 711