/**
  * Handle sign up requests from modal
  */
 public function signup()
 {
     // Check that Facebook account is not in use!
     $fbId = \FacebookClient::getInstance()->getUserId();
     if ($this->fbClientFactory->isFacebookIdInUse($fbId)) {
         $errorMessageKey = 'fbconnect-error-fb-account-in-use';
         $messageParams = [$this->request->getVal('username')];
         $this->setErrorResponse($errorMessageKey, $messageParams);
         return;
     }
     $signupResponse = $this->app->sendRequest('FacebookSignup', 'createAccount')->getData();
     switch ($signupResponse['result']) {
         case 'ok':
             $this->result = 'ok';
             break;
         case 'unconfirm':
             $this->result = 'unconfirm';
             break;
         case 'error':
         default:
             // pass errors to the frontend form
             $this->response->setData($signupResponse);
             break;
     }
 }