gestion des no email
This commit is contained in:
parent
69af156662
commit
f77be05751
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue