Upon the death of any member after retirement for service-connected disability, his or her retirement allowance as it was at his or her death if not modified in accordance with one of the optional settlements specified in Article 11 (commencing with Section 31760), shall be continued throughout life to his or her surviving spouse. If there is no surviving spouse entitled to an allowance hereunder or if she or he dies before every child of such deceased member attains the age of 18 years, then the allowance which the surviving spouse would have received had she or he lived, shall be paid to his or her child or children under said age, collectively, to continue until every such child dies or attains said age; provided, that no child shall receive any allowance after marrying or attaining the age of 18 years. No allowance, however, shall be paid under this section to a surviving spouse unless she or he was married to the member prior to the date of his or her retirement.
Notwithstanding any other provisions of this section, the benefits otherwise payable to the children of the member shall be paid to those children through the age of 21 if the children remain unmarried and are regularly enrolled as full-time students in an accredited school as determined by the board.