Merge branch 'master' into dist/envole/6/master

This commit is contained in:
Arnaud Fornerot 2021-01-21 17:32:11 +01:00
commit ff9d07e0cb
1 changed files with 2 additions and 4 deletions

View File

@ -44,7 +44,6 @@ class SecurityController extends Controller
$attributes = \phpCAS::getAttributes(); $attributes = \phpCAS::getAttributes();
// Init // Init
$username = "";
$email = ""; $email = "";
$lastname = ""; $lastname = "";
$firstname = ""; $firstname = "";
@ -63,9 +62,6 @@ class SecurityController extends Controller
if(isset($attributes[$this->getParameter('user_attr_cas_firstname')])) if(isset($attributes[$this->getParameter('user_attr_cas_firstname')]))
$firstname = $attributes[$this->getParameter('user_attr_cas_firstname')]; $firstname = $attributes[$this->getParameter('user_attr_cas_firstname')];
// Cas nomail
if(empty($email)) $email = $username."@nomail.com";
$user = $em->getRepository('CadolesCoreBundle:User')->findOneBy(array("username"=>$username)); $user = $em->getRepository('CadolesCoreBundle:User')->findOneBy(array("username"=>$username));
$exists = $user ? true : false; $exists = $user ? true : false;
@ -83,6 +79,8 @@ class SecurityController extends Controller
} }
if($masteridentity=="SSO") { if($masteridentity=="SSO") {
if(empty($email)) $email = $username."@nomail.com";
// Là c'est normal que potentiellement il n'existe pas il faut donc l'autogénérer // Là c'est normal que potentiellement il n'existe pas il faut donc l'autogénérer
$user = new User(); $user = new User();