"Yes, a foreign legionnaire may apply for French citizenship from three years of service.
"It is usually granted, subject to have a good way to serve and have proven its willingness to integrate the French Nation.
"The legionnaire who does not wish to opt for French nationality retains his foreign nationality and is just as much to stay in France at the end of his contract and once he is in possession of a residence permit.
"Obtaining a residence card is consecutive to obtaining a "certificate of good conduct" issued by the command of the Foreign Legion to each deserving legionnaire leaving active service.
Furthermore, the legionnaire wounded in operation may acquire, from right, French nationality (law called "the blood shed")."
While it’s not uncommon to give citizenship for helping the country (notably by spilled blood in the légion étrangère), this particular case is widely thought to be a staged event. A lot of things are really really strange, for instance how a small kid arrived in this position (some French scientists ruled it impossible), why the man who is holding him from the balcony don’t save it directly, why no investigation have been ordonned, etc.
Don’t forget this happened in a context of permanent terror attacks that eroded the image of immigrants. In particular, it conveniently happened less than two months after the hostage-taking of 23 March 2018 which lead to the death of lieutenant-colonel Beltrame, an episode that shocked the public opinion.