public function byUsernameAction(Request $request)
   {
       $term = $request->get('username');
       $users = $this->get('asf_user.user.manager')->getRepository()->findByUsernameContains($term);
       $search = array();
       	
       foreach($users as $user) {
           $search[] = array(
               'id' => $user->getId(),
               'username' => $user->getUsername(),
               'email' => $user->getEmail()
           );
       }
       
       $response = new Response();
       $response->setContent(json_encode(array(
           'total_count' => count($search),
           'items' => $search
       )));
       
       return $response;
   }