Any officer, elective or otherwise, who leaves or shall have left the service of any city in order to enter upon active service with the armed forces of the United States shall be reinstated and restored to his office upon his discharge or release from such active service with the armed forces; provided, such discharge or release is prior to the expiration of the term for which he has been elected or appointed.
The rights created by this section shall have no application to any officer who shall have been dishonorably discharged or released from such armed forces, or shall have been so mentally or physically disabled as to be incapable of performing the duties of his office or shall fail to present himself to the legislative body or other appointing authority of such city ready and willing to assume the duties of his office, within six months from the time of his discharge or release from active service with the armed forces.
The office from which such officer absents himself to enter upon active service with the armed forces shall not be considered to be vacant but the legislative body or other appointing authority, as the case may be, may appoint an officer to temporarily replace any such officer so absenting himself to enter upon active service with the armed forces. Such temporary officers shall have all of the powers and duties of the office to which he may be temporarily appointed and shall hold said office until the expiration of the term thereof or until the officer returns from service with the armed forces, whichever event first occurs.
Ca. Mil. and Vet. Code § 395.8