Quantcast
Channel: Programmierung - Shopware Community Forum
Viewing all articles
Browse latest Browse all 2871

$this->redirect()

$
0
0

Guten Morgen alle Zusammen.

Ich rufe eine eigenen Controller inkl. eines Parameters. z.b /controller/index/id/2/

Vorher wird im preDispatch() noch überprüft, ob dieser User eingeloggt ist, ansonsten leite ich Ihn zum Login

$this->admin = Shopware()->Modules()->Admin();
        if (!$this->admin->sCheckUser()) {
          return $this->redirect(
              array(
                  'controller'=> 'account',
                  'action' => 'index',
                  'sTarget'=> 'controller',
                  'sTargetAction' => 'index'
                  )
          );
        }

Damit stelle ich sicher, dass dieser auch eingeloggt ist.

Wie aber schleife ich hier noch den Parameter /id/2 mit durch ? Diese Art der Umleitung geht ja nicht mit $this->forward.


Viewing all articles
Browse latest Browse all 2871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>