From 790b5b04f0b0578badb2ee24e2562e0871e1b133 Mon Sep 17 00:00:00 2001 From: "Jeroen van Meeuwen (Kolab Systems)" Date: Mon, 21 Sep 2015 12:42:20 +0200 Subject: [PATCH] A very simple and ridumentary loginfail plugin --- plugins/loginfail/loginfail.html.sample | 17 +++++++++++++++++ plugins/loginfail/loginfail.php | 20 ++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 plugins/loginfail/loginfail.html.sample create mode 100644 plugins/loginfail/loginfail.php diff --git a/plugins/loginfail/loginfail.html.sample b/plugins/loginfail/loginfail.html.sample new file mode 100644 index 00000000..6bfbf736 --- /dev/null +++ b/plugins/loginfail/loginfail.html.sample @@ -0,0 +1,17 @@ + + + + + diff --git a/plugins/loginfail/loginfail.php b/plugins/loginfail/loginfail.php new file mode 100644 index 00000000..72429515 --- /dev/null +++ b/plugins/loginfail/loginfail.php @@ -0,0 +1,20 @@ +add_hook('login_failed', array($this, 'login_failed')); + } + + public function login_failed($args) { + $rcmail = rcmail::get_instance(); + + $filename = $this->home . '/loginfail.html'; + + if (file_exists($filename)) { + $html = file_get_contents($filename); + $rcmail->output->add_footer($html); + } + } + } +?>