fix : ajaxRecStat on user null for google robot (2)

This commit is contained in:
Grégoire
2020-01-03 11:09:31 +01:00
parent 41c046392e
commit dffcf66ce3
@@ -186,7 +186,9 @@ class CompanyController extends Controller
} else {
$history->recordIt("Anonymous", "r", 'AppBundle\Entity\Company', $company->getId(), serialize($company));
}
if($this->getUser()->getUsername()){
if($this->getUser() == null){
return new JsonResponse(array('code' => "ok", "user" => $this->getUser()->getUsername()));
} else{
return new JsonResponse(array('code' => "ok"));