get('session')->save(); $this->get('net15.restifier.dispatch')->map('GET',$this,'getLogs'); return $this->get('net15.restifier.dispatch')->exec(); } /** * api function * * response : string JSON */ public function getLogs(){ $json = array(); $json['history'] = array(); /** * @var CustomUserInterface $user */ $user = $this->getUser(); if(null !== $user){ $json['history'] = $this->get('net15.security.login.history')->getEntryForUser($user,"array"); } return new JsonResponse($json); } }