public function generateCodeAction() { if ($this->request->isPost()) { if ($this->request->isAjax()) { $code = Users::getProgressiveCode(); $response = array('code' => $code); return $this->sendAjax($response); } } }