Esempio n. 1
0
 /**
  * Prevent users registering by administrator
  *
  * @return void
  */
 public function handleRequest()
 {
     if ($this->isRegisterMode() || 'delete' === \XLite\Core\Request::getInstance()->action) {
         \XLite\Core\TopMessage::addError('It is impossible to delete or create user accounts because your store currently works ' . 'as an integration with Drupal and shares users with Drupal. Deleting/creating user ' . 'accounts is possible via Drupal administrator interface.');
         $this->markAsAccessDenied();
     }
     return parent::handleRequest();
 }
Esempio n. 2
0
 /**
  * init
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     if (\XLite\Controller\Admin\Profile::getInstance()->isRegisterMode()) {
         foreach ($this->tabs as $key => $tab) {
             if ('profile' != $key) {
                 unset($this->tabs[$key]);
             }
         }
     }
 }
Esempio n. 3
0
 /**
  * The "mode" parameter used to determine if we create new or modify existing profile
  *
  * @return boolean
  */
 public function isRegisterMode()
 {
     return \XLite\Controller\Admin\Profile::getInstance()->isRegisterMode();
 }
Esempio n. 4
0
 /**
  * Return value for the "register" mode param
  *
  * @return string
  */
 public static function getRegisterMode()
 {
     return \XLite\Controller\Admin\Profile::getRegisterMode();
 }
Esempio n. 5
0
 /**
  * Check if we need to forbid current action
  *
  * @return boolean
  */
 protected function checkForDemoController()
 {
     return parent::checkForDemoController() && \XLite::isAdminZone();
 }