Example #1
0
 public function pageSetupMasterAccount()
 {
     // Get the alert message stream
     $ms = $this->_app->alerts;
     // Do not allow registering a master account if one has already been created
     if (UserLoader::exists($this->_app->config('user_id_master'))) {
         $ms->addMessageTranslated("danger", "MASTER_ACCOUNT_EXISTS");
         $this->_app->redirect($this->_app->urlFor('uri_home'));
     }
     $schema = new \Fortress\RequestSchema($this->_app->config('schema.path') . "/forms/register.json");
     $validators = new \Fortress\ClientSideValidator($schema, $this->_app->translator);
     $this->_app->render('common/install/install-master.html', ['page' => ['author' => $this->_app->site->author, 'title' => "Installation | Register Master Account", 'description' => "Set up the master account for your installation of UserFrosting", 'alerts' => $this->_app->alerts->getAndClearMessages()], 'validators' => $validators->formValidationRulesJson(), 'table_config' => Database::getTableConfiguration()]);
 }