A very simple and ridumentary loginfail plugin
This commit is contained in:
parent
823c62be9f
commit
790b5b04f0
2 changed files with 37 additions and 0 deletions
17
plugins/loginfail/loginfail.html.sample
Normal file
17
plugins/loginfail/loginfail.html.sample
Normal file
|
@ -0,0 +1,17 @@
|
|||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('.loginfail').fadeIn(1000);
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<div class="loginfail" style="display: none; position: relative; align: center;">
|
||||
<br clear="all" />
|
||||
<hr width="30%" />
|
||||
<div align="center">
|
||||
<p>
|
||||
<i>This is an example placeholder for information about your login having failed.</i>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
20
plugins/loginfail/loginfail.php
Normal file
20
plugins/loginfail/loginfail.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
class loginfail extends rcube_plugin {
|
||||
public $task = 'login';
|
||||
|
||||
function init() {
|
||||
$this->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);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Add table
Reference in a new issue