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

View File

@ -44,7 +44,6 @@ class SecurityController extends Controller
$attributes = \phpCAS::getAttributes();
// Init
$username = "";
$email = "";
$lastname = "";
$firstname = "";
@ -63,9 +62,6 @@ class SecurityController extends Controller
if(isset($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));
$exists = $user ? true : false;
@ -83,6 +79,8 @@ class SecurityController extends Controller
}
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
$user = new User();