Logout -> A page of this type creates a logout link for a protected area. After logging out, you can redirect visitors to any page or to the last page they visited.
Wie bzw. wo lege ich jetzt die Zielseite nach Logout fest?
Im Moment fliegen die Nutzer zurück auf die Startseite.
Ich verwende das default template
PHP-Code:
<!-- indexer::stop -->
<div class="<?= $this->class ?> <?= $this->logout ? 'logout' : 'login' ?> block"<?= $this->cssID ?><?php if ($this->style): ?> style="<?= $this->style ?>"<?php endif; ?>>
<?php if ($this->headline): ?>
<<?= $this->hl ?>><?= $this->headline ?></<?= $this->hl ?>>
<?php endif; ?>
<form<?php if ($this->action): ?> action="<?= $this->action ?>"<?php endif; ?> id="<?= $this->formId ?>" method="post">
<div class="formbody">
<?php if ($this->message): ?>
<p class="error"><?= $this->message ?></p>
<?php endif; ?>
<input type="hidden" name="FORM_SUBMIT" value="<?= $this->formId ?>">
<input type="hidden" name="REQUEST_TOKEN" value="<?= $this->requestToken ?>">
<input type="hidden" name="_target_path" value="<?= $this->targetPath ?>">
<input type="hidden" name="_always_use_target_path" value="<?= $this->forceTargetPath ?>">
<?php if ($this->remembered): ?>
<input type="hidden" name="username" value="<?= $this->value ?>">
<input type="hidden" name="autologin" value="<?= $this->autologin ? '1' : '' ?>">
<?php endif; ?>
<?php if ($this->logout): ?>
<!-- <p class="login_info"><?= $this->loggedInAs ?><br><?= $this->lastLogin ?></p>-->
<?php elseif ($this->twoFactorEnabled): ?>
<h3><?= $this->twoFactorAuthentication ?></h3>
<div class="widget widget-text">
<label for="verify"><?= $this->authCode ?></label>
<input type="text" name="verify" id="verify" class="text" value="" autocapitalize="off" autocomplete="one-time-code" required>
</div>
<div class="widget widget-checkbox">
<fieldset class="checkbox_container">
<span><input type="checkbox" name="trusted" id="trusted" value="1" class="tl_checkbox"> <label for="trusted"><?= $this->trans('MSC.twoFactorTrustDevice') ?></label></span>
</fieldset>
</div>
<?php else: ?>
<?php if ($this->remembered): ?>
<p class="login_info"><?= $this->loggedInAs ?><br><?= $this->reauthenticate ?></p>
<?php else: ?>
<div class="widget widget-text">
<!--<label for="username"><?= $this->username ?></label>-->
<input type="text" name="username" id="username" class="text" placeholder="Benutzername" value="<?= $this->value ?>" autocapitalize="off" autocomplete="username" required>
</div>
<?php endif; ?>
<div class="widget widget-password">
<!--<label for="password"><?= $this->password ?></label>-->
<input type="password" name="password" id="password" class="text password" value="" placeholder="Passwort" autocomplete="current-password" required>
</div>
<?php if ($this->autologin && !$this->remembered): ?>
<div class="widget widget-checkbox">
<fieldset class="checkbox_container">
<span><input type="checkbox" name="autologin" id="autologin" value="1" class="checkbox"> <label for="autologin"><?= $this->autoLabel ?></label></span>
</fieldset>
</div>
<?php endif; ?>
<?php endif; ?>
<div class="widget widget-submit">
<button type="submit" class="submit"><?= $this->slabel ?></button>
<?php if ($this->twoFactorEnabled): ?>
<a href="<?= $this->route('contao_frontend_logout') ?>"><?= $this->cancel ?> ›</a>
<?php endif; ?>
</div>
<?php if ($this->pwResetUrl): ?>
<div class="password-reset">
<a href="<?= $this->pwResetUrl ?>"><?= $this->trans('MSC.lostPassword') ?></a>
</div>
<?php endif; ?>
</div>
</form>
</div>
<!-- indexer::continue -->