start.php 803 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * Fail2Ban support for Elgg
  4. * This plugin replaces the default login action with one almost but not quite identical. This new login
  5. * action will log to the system auth.log successful and failed logins, which let you hook into fail2ban.
  6. *
  7. * @see Readme.md for details
  8. *
  9. * @licence GNU Public License version 2
  10. * @link https://github.com/mapkyca/elgg-fail2ban
  11. * @link http://www.marcus-povey.co.uk
  12. * @link http://www.fail2ban.org
  13. * @author Marcus Povey <marcus@marcus-povey.co.uk>
  14. */
  15. function elgg_fail2ban_init()
  16. {
  17. // Replace login
  18. elgg_register_action('login', dirname(__FILE__) . '/actions/login.php', 'public');
  19. }
  20. elgg_register_event_handler('init','system','elgg_fail2ban_init');