예제 #1
0
파일: Profile.php 프로젝트: kingsj/core
 /**
  * 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();
 }
예제 #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]);
             }
         }
     }
 }
예제 #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();
 }
예제 #4
0
파일: Main.php 프로젝트: kirkbauer2/kirkxc
 /**
  * Return value for the "register" mode param
  *
  * @return string
  */
 public static function getRegisterMode()
 {
     return \XLite\Controller\Admin\Profile::getRegisterMode();
 }
예제 #5
0
파일: Profile.php 프로젝트: kingsj/core
 /**
  * Check if we need to forbid current action
  *
  * @return boolean
  */
 protected function checkForDemoController()
 {
     return parent::checkForDemoController() && \XLite::isAdminZone();
 }