feel free to keep it strictly simple...

How to use KeepOut table

Starting with L* 7.0.0 there is a table keepout created in the database.

You can handle this table within your own addons, via a code2 section or via GUI Admintool KeepOut.

With the use of this table you are enabled to block unwanted emails, ip-adresses or referrer in quickform forms or during signup process in your LEPTON installation.

Just follow first instructions after you entered some values in the keepout core table.

Usage during Signup Process

First create a signup2 page (use a copy of account/signup2), place it in your frontend-template folder /frontend/login/ and use following code for a first test

  1. echo(LEPTON_tools::display($_POST,'pre','ui positive message'));
  2. $test = LEPTON_core::check_entry($_POST['email']);
  3. if($test === false)
  4. {
  5. echo (LEPTON_tools::display('Welcome','pre','ui positive message'));
  6. }
  7. if($test === true)
  8. {
  9. echo (LEPTON_tools::display('blocked','pre','ui negative message'));
  10. }
  11. die(LEPTON_tools::display($_POST['email'],'pre','ui purple message'));
last edit: 02. Sep 2023 CEST 16:20:58

Using in Quickform

Create a file quickform_custom_frontend in modules/quickform/classes and use following code for a first test:

  1. class quickform_custom_frontend extends quickform
  2. {
  3. public static $instance;
  4. public function initialize()
  5. {
  6. $this->block_entry();
  7. }
  8. public function block_entry()
  9. {
  10. if(isset($_POST['timestamp']))
  11. {
  12. // check values
  13. $ip = LEPTON_core::check_entry($_SERVER['SERVER_ADDR']);
  14. $mail = LEPTON_core::check_entry($_POST['email']);
  15. if($ip === true || $mail === true)
  16. {
  17. die('blocked');
  18. }
  19. else
  20. {
  21. die('welcome');
  22. }
  23. }
  24. }
  25. }
last edit: 29. Apr 2023 CEST 15:57:31

In every case it is possible to handle the checks in that way you want.

Use the custom files to create the reaction of your needs.

Notice: if you use addon signup you don't have to do anything. Handling keepout is completely implemented in signup > 1.4.0.

If you don't like the standard handling you simply have to copy the file keepout.php, rename the copy to keepout_custom.php and edit the handling to your needs.

For any further questions please use the forum.