public function view()
 {
     $defaultMessage = t('Your user account is being upgraded and requires a new password. Please enter your email address below to create this now.');
     $resetMessage = \Core::make('config/database')->get(self::PASSWORD_RESET_MESSAGE_KEY, $defaultMessage);
     $this->set('resetMessage', $resetMessage);
     $user = new User();
     $this->set('disableForm', !$user->isSuperUser());
 }
Пример #2
0
 public function remove_locale_section()
 {
     if (!$this->token->validate('remove_locale_section')) {
         $this->error->add($this->token->getErrorMessage());
     }
     $u = new User();
     if (!$u->isSuperUser()) {
         $this->error->add(t("Only the super user may remove a multilingual section."));
     }
     $service = new Service($this->entityManager);
     /**
      * @var $locale Locale
      */
     $locale = $service->getByID($this->post('siteLocaleID'));
     if (!is_object($locale)) {
         $this->error->add(t("Invalid locale object."));
     }
     if (!$this->error->has()) {
         $service->delete($locale);
         $this->flash('success', t('Section removed.'));
         $this->redirect('/dashboard/system/multilingual/setup', 'view');
     }
     $this->view();
 }
Пример #3
0
 public function isSuperUser()
 {
     return parent::isSuperUser();
 }