Ignore:
Timestamp:
Jan 21, 2010, 3:13:47 PM (14 years ago)
Author:
cljosse
Message:

[mail_supervisor] Add option for new register

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Mail_supervisor/main.inc.php

    r4452 r4715  
    22/*
    33Plugin Name: Mail supervisor
    4 Version: 1.2.9.a
     4Version: 1.3.1
    55Description: Mail supervisor surveille l'envoie des mails.
    66Plugin URI: http://piwigo.org/ext/extension_view.php?eid=315
     
    7979                                        );                                                                                                                                     
    8080
    81 
     81 global $conf ;
     82 
    8283add_event_handler('send_mail', 'clj_mail',EVENT_HANDLER_PRIORITY_NEUTRAL - 1 , 6);
    8384
     
    347348}
    348349
     350        $mails_options = explode("," , $conf['mail_superv']);
     351         
    349352//==========================================================================================
     353if ($mails_options[7]=='on'  ) {
    350354 add_event_handler('register_user_check', 'Test_spam_g', EVENT_HANDLER_PRIORITY_NEUTRAL +2  , 2);
    351  
     355 }
    352356function Test_spam_g ($err, $user)
    353357{
     358
     359if (count($err)!=0 ) return $err ;
    354360if ( !isset($_POST['submit_add']) && !isset($_POST['submit'])  ) return $err ;
    355 if (count($err)!=0 ) return $err ;
    356361//Liableelard
    357362include_once (MAIL_SUPERV_PATH.'include/fonctions.php');
     
    363368        $user_name = $user['username'];
    364369}
     370$user_name ="";
    365371 $ip='0';
    366372                if (test_spam($ip,$user_name ,$mail ))
     
    371377                    $err[] = $user_name . " : " .$mail . " ". l10n('is_a_spam')   ;
    372378                 }
     379                 
    373380return $err ;
    374381}
Note: See TracChangeset for help on using the changeset viewer.