As far as I know you have to be signed up before you fly, and this applies to all airlines. You have up to 6 months after flying to submit your flights for crediting.
A friend's son got rerouted from a Star Alliance J reward ticket to an AA revenue flight. I sent him an email and told him to open an AA account for his son ASAP before that AA flight took off. It worked and he got a lot of miles for that flight. ^