mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
parent
19f2c813f1
commit
a230fd4aa8
@ -79,7 +79,7 @@ class IndexController extends Controller
|
|||||||
$form = new Form(array(
|
$form = new Form(array(
|
||||||
'onSuccess' => function () {
|
'onSuccess' => function () {
|
||||||
$wizard = new WebWizard();
|
$wizard = new WebWizard();
|
||||||
$wizard->clearSession();
|
$wizard->clearSession(false);
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
$form->setUidDisabled();
|
$form->setUidDisabled();
|
||||||
|
@ -380,17 +380,21 @@ class WebWizard extends Wizard implements SetupWizard
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear the session being used by this wizard and drop the setup token
|
* Clear the session being used by this wizard
|
||||||
|
*
|
||||||
|
* @param bool $removeToken If true, the setup token will be removed
|
||||||
*/
|
*/
|
||||||
public function clearSession()
|
public function clearSession($removeToken = true)
|
||||||
{
|
{
|
||||||
parent::clearSession();
|
parent::clearSession();
|
||||||
|
|
||||||
|
if ($removeToken) {
|
||||||
$tokenPath = Config::resolvePath('setup.token');
|
$tokenPath = Config::resolvePath('setup.token');
|
||||||
if (file_exists($tokenPath)) {
|
if (file_exists($tokenPath)) {
|
||||||
@unlink($tokenPath);
|
@unlink($tokenPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the setup for this wizard
|
* Return the setup for this wizard
|
||||||
|
Loading…
x
Reference in New Issue
Block a user