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