gestion synchro no mail
This commit is contained in:
parent
a5a57cc9e0
commit
6f70f97ebb
@ -67,7 +67,6 @@ class SecurityController extends AbstractController
|
||||
$attributes = \phpCAS::getAttributes();
|
||||
|
||||
// Init
|
||||
$username = "";
|
||||
$email = "";
|
||||
$lastname = "";
|
||||
$firstname = "";
|
||||
@ -86,13 +85,12 @@ class SecurityController extends AbstractController
|
||||
if(isset($attributes[$this->getParameter('casFirstname')]))
|
||||
$firstname = $attributes[$this->getParameter('casFirstname')];
|
||||
|
||||
// Cas nomail
|
||||
if(empty($email)) $email = $username."@nomail.com";
|
||||
|
||||
$user = $em->getRepository('App:User')->findOneBy(array("username"=>$username));
|
||||
$exists = $user ? true : false;
|
||||
|
||||
if (!$exists) {
|
||||
if(empty($email)) $email = $username."@nomail.com";
|
||||
|
||||
$user = new User();
|
||||
$key = Uuid::uuid4();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user