Changeset View
Changeset View
Standalone View
Standalone View
plugins/kolab_2fa/kolab_2fa.php
Show First 20 Lines • Show All 634 Lines • ▼ Show 20 Lines | public function settings_save() | ||||
else { | else { | ||||
$errors++; | $errors++; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
if ($success) { | if ($success) { | ||||
$this->api->output->show_message($data === false ? $this->gettext('factorremovesuccess') : $this->gettext('factorsavesuccess'), 'confirmation'); | $this->api->output->show_message($data === false ? $this->gettext('factorremovesuccess') : $this->gettext('factorsavesuccess'), 'confirmation'); | ||||
$this->api->output->command('plugin.save_success', array('method' => $method, 'active' => $data !== false) + $save_data); | $this->api->output->command('plugin.kolab_2fa_save_success', array('method' => $method, 'active' => $data !== false) + $save_data); | ||||
} | } | ||||
else if ($errors) { | else if ($errors) { | ||||
$this->api->output->show_message($this->gettext('factorsaveerror'), 'error'); | $this->api->output->show_message($this->gettext('factorsaveerror'), 'error'); | ||||
$this->api->output->command('plugin.reset_form', $method); | $this->api->output->command('plugin.reset_form', $method); | ||||
} | } | ||||
$this->api->output->send(); | $this->api->output->send(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | class kolab_2fa extends rcube_plugin | ||||
*/ | */ | ||||
protected function check_secure_mode() | protected function check_secure_mode() | ||||
{ | { | ||||
$valid = ($_SESSION['kolab_2fa_secure_mode'] && $_SESSION['kolab_2fa_secure_mode'] > time() - 180); | $valid = ($_SESSION['kolab_2fa_secure_mode'] && $_SESSION['kolab_2fa_secure_mode'] > time() - 180); | ||||
return $valid; | return $valid; | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |