diff --git a/Controleur/ControleurFichebeneficiaire.php b/Controleur/ControleurFichebeneficiaire.php index e0b75a5..66a60c1 100755 --- a/Controleur/ControleurFichebeneficiaire.php +++ b/Controleur/ControleurFichebeneficiaire.php @@ -268,8 +268,18 @@ class ControleurFichebeneficiaire extends Controleur { file_put_contents($chemin, $data); $rand = rand(1,1000000); + $rand2 = rand(1,1000000); $nomImage = $username."_".$rand.'.'. $extension; - $nomImageCrypte_0 = $username."_".$rand.'.bin'; + + if($_SESSION['crypterPhoto']=="1") + { + $nomImageCrypte_0 = $username."_".$rand.'.bin'; + } + else + { + $nomImageCrypte_0 = $username."_".$rand2.'.jpg'; + } + $nomImageCrypte = $_SESSION['lienPhotoFace'] . $nomImageCrypte_0; $this->beneficiaire->init_traiterlaface('1');