Changeset 6757


Ignore:
Timestamp:
08/15/10 02:55:57 (9 years ago)
Author:
Eric
Message:
  • Bug 1795 fixed: Fixes rules using email information and/or email of validation
  • Language files fixed
Location:
extensions/NBC_UserAdvManager/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • extensions/NBC_UserAdvManager/trunk/changelog.txt.php

    r6754 r6757  
    182182            Bug 1789 fixed - Escaping double quotes in text fields 
    183183            Bug 1790 fixed - Validation tracking tab is set when correct options are set 
     184            Bug 1795 fixed - Fixes rules using email information and/or email of validation 
    184185*/ 
    185186?> 
  • extensions/NBC_UserAdvManager/trunk/include/functions.inc.php

    r6754 r6757  
    388388     
    389389    return get_absolute_root_url().UAM_PATH.'ConfirmMail.php?key='.$Confirm_Mail_ID; 
     390  } 
     391} 
     392 
     393 
     394/* Function called from main.inc.php to set group to new users if manual validation is set */ 
     395function setgroup($user_id) 
     396{ 
     397  global $conf; 
     398   
     399  $conf_UAM = unserialize($conf['UserAdvManager']); 
     400 
     401  $query = " 
     402DELETE FROM ".USER_GROUP_TABLE." 
     403WHERE user_id = '".$user_id."' 
     404  AND ( 
     405    group_id = '".$conf_UAM[2]."' 
     406  OR  
     407    group_id = '".$conf_UAM[3]."' 
     408  ) 
     409;"; 
     410  pwg_query($query); 
     411 
     412  if (!is_admin() and $conf_UAM[8] <> -1) 
     413  { 
     414    $query = " 
     415UPDATE ".USER_INFOS_TABLE." 
     416SET status = '".$conf_UAM[8]."' 
     417WHERE user_id = '".$user_id."' 
     418;"; 
     419    pwg_query($query); 
     420  } 
     421 
     422  if ( $conf_UAM[2] <> -1 ) 
     423  { 
     424    $query = " 
     425INSERT INTO ".USER_GROUP_TABLE." 
     426  (user_id, group_id) 
     427VALUES 
     428  ('".$user_id."', '".$conf_UAM[2]."') 
     429;"; 
     430    pwg_query($query); 
    390431  } 
    391432} 
  • extensions/NBC_UserAdvManager/trunk/language/de_DE/plugin.lang.php

    r6754 r6757  
    3030$lang['Err_audit_advise'] = '<b>Sie müssen Korrekturen an mit neuen Regeln die Sie aktiviert haben, nachzukommen durchzuführen.<br>Verwenden Sie ein Datenbank-Management-Dienstprogramm, um Benutzer-Accounts direkt in der Tabelle richtig ###_USERS'; 
    3131$lang['UAM_Empty Author'] = 'Der Autor Feld müssen ausgefüllt werden um einen Kommentar zu schicken.'; 
    32 if ( isset($conf_UAM[1]) and $conf_UAM[1] == 'true' ) 
    33         $lang['reg_err_login5'] = 'Benutzername bereits vorhanden, WARNUNG Name ist Groß-und Kleinschreibung.'; 
     32$lang['reg_err_login5'] = 'Benutzername bereits vorhanden, WARNUNG Name ist Groß-und Kleinschreibung.'; 
    3433$lang['reg_err_login6'] = 'Benutzername muss nicht die folgenden Zeichen übereinstimmen: '; 
    3534$lang['reg_err_login7'] = 'Ihre E-Mail-Anbieter für die Registrierung ist verboten. Gebannten E-Mail-Anbieter sind: '; 
  • extensions/NBC_UserAdvManager/trunk/language/en_UK/plugin.lang.php

    r6754 r6757  
    2929$lang['Err_audit_advise'] = '<b>you have to perform corrections to comply with new rules that you have activated.<br>Use a database management utility to correct user accounts directly in the table ###_USERS'; 
    3030$lang['UAM_Empty Author'] = 'The author field have to be filled to send a comment.'; 
    31 if ( isset($conf_UAM[1]) and $conf_UAM[1] == 'true' ) 
    32         $lang['reg_err_login5'] = 'Username already exist, WARNING name is case insensitive (Shift = Tiny).'; 
     31$lang['reg_err_login5'] = 'Username already exist, WARNING name is case insensitive (Shift = Tiny).'; 
    3332$lang['reg_err_login6'] = 'Username does not have to match the following characters: '; 
    3433$lang['reg_err_login7'] = 'Your email provider is banned for registration. Banned email providers are: '; 
  • extensions/NBC_UserAdvManager/trunk/language/es_ES/plugin.lang.php

    r6754 r6757  
    3030$lang['Err_audit_advise'] = '<b>Usted tiene que realizar correcciones para cumplir con las nuevas normas que ha activado.<br>Use una herramienta de gestión de base de datos para corregir las cuentas de usuario directamente en la tabla ###_USERS'; 
    3131$lang['UAM_Empty Author'] = 'El campo de autor tienen que ser llenados para enviar un comentario.'; 
    32 if ( isset($conf_UAM[1]) and $conf_UAM[1] == 'true' ) 
    33         $lang['reg_err_login5'] = 'Este nombre de usuario ya existe,  ADVERTENCIA se distinguen las mayúsculas (Shift = pequeño).'; 
     32$lang['reg_err_login5'] = 'Este nombre de usuario ya existe,  ADVERTENCIA se distinguen las mayúsculas (Shift = pequeño).'; 
    3433$lang['reg_err_login6'] = 'El nombre de usuario no puede coincidir con los siguientes caracteres: '; 
    3534$lang['reg_err_login7'] = 'Su proveedor de correo electrónico está prohibido para el registro. Proveedores de correo electrónico en veda son: '; 
  • extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php

    r6754 r6757  
    2929$lang['Err_audit_advise'] = '<b>Vous avez des corrections a faire pour respecter les nouvelles règles que vous avez activées.<br>Utilisez un utilitaire de gestion de base de données pour corriger les comptes utilisateurs directement dans la table ###_USERS si nécessaire.</b><br><br>'; 
    3030$lang['UAM_Empty Author'] = 'Le champs auteur doit être rempli pour enregistrer un commentaire.'; 
    31 if ( isset($conf_UAM[1]) and $conf_UAM[1] == 'true' ) 
    32         $lang['reg_err_login5'] = 'ce nom utilisateur est déjà pris, ATTENTION le nom est insensible à la casse (Majuscule = Minuscule).'; 
     31$lang['reg_err_login5'] = 'ce nom utilisateur est déjà pris, ATTENTION le nom est insensible à la casse (Majuscule = Minuscule).'; 
    3332$lang['reg_err_login6'] = 'le nom utilisateur ne doit pas contenir les caractère suivants : '; 
    3433$lang['reg_err_login7'] = 'L\'adresse email est issue d\'un prestataire interdit. Les prestataires d\'adresses email interdits à l\'inscription sont : '; 
  • extensions/NBC_UserAdvManager/trunk/language/it_IT/plugin.lang.php

    r6754 r6757  
    3030$lang['Err_audit_advise'] = '<b>Dovete eseguire delle correzioni per rispettare le nuove impostazzioni che avete attivato.<br> Utilizzare un programma per la gestione della base dati per correggere i conti utente direttamente nella tabella ###_USERS'; 
    3131$lang['UAM_Empty Author'] = 'Il campo autore deve essere riempito per potere inviare un commento.'; 
    32 if ( isset($conf_UAM[1]) and $conf_UAM[1] == 'true' ) 
    33         $lang['reg_err_login5'] = 'Nome utente esiste già. Attenzione : il campo è insensibile alle maiuscole/minuscole.'; 
     32$lang['reg_err_login5'] = 'Nome utente esiste già. Attenzione : il campo è insensibile alle maiuscole/minuscole.'; 
    3433$lang['reg_err_login6'] = 'Nome utente non deve contenere in caratteri seguenti: '; 
    3534$lang['reg_err_login7'] = 'Il tuo provider di posta usa dominio d\'Email proibito. I domini preibiti sono i seguenti: '; 
  • extensions/NBC_UserAdvManager/trunk/main.inc.php

    r6753 r6757  
    128128  $conf_UAM = unserialize($conf['UserAdvManager']); 
    129129   
    130   /* Sending registration confirmation by email */ 
    131   if ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 
    132   { 
    133     if (is_admin() and isset($conf_UAM[20]) and $conf_UAM[20] == 'true') 
    134     { 
    135     $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 
    136     SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], true);  
    137     } 
    138     elseif (is_admin() and isset($conf_UAM[20]) and $conf_UAM[20] == 'false') 
    139     { 
     130  if ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 
     131  { 
     132    /* This is to send an information email and set user to "waiting" group or status until admin validation */ 
    140133    $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 
    141134    SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false); 
     135    setgroup($register_user['id']);// Set to "waiting" group or status until admin validation 
     136  } 
     137  elseif ((isset($conf_UAM[0]) and $conf_UAM[0] == 'false') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 
     138  { 
     139    /* This is to set user to "wainting" group or status until admin validation */ 
     140    setgroup($register_user['id']);// Set to "waiting" group or status until admin validation 
     141  } 
     142  elseif ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'false')) 
     143  { 
     144    /* This is to send an information email without validation key */ 
     145    $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 
     146    SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false); 
     147  } 
     148  /* Sending registration confirmation by email */ 
     149  elseif ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 
     150  { 
     151    if (is_admin() and isset($conf_UAM[20]) and $conf_UAM[20] == 'true') 
     152    { 
     153      $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 
     154      SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], true);  
     155    } 
     156    elseif (is_admin() and isset($conf_UAM[20]) and $conf_UAM[20] == 'false') 
     157    { 
     158      $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 
     159      SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false); 
    142160    } 
    143161    elseif (!is_admin()) 
    144162    { 
    145     $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 
    146     SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], true); 
     163      $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 
     164      SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], true); 
    147165    } 
    148166  } 
     
    337355       
    338356      /* Sending registration confirmation by email */ 
    339       if ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 
     357      if ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 
    340358      { 
    341359        $confirm_mail_need = false; 
     
    350368           
    351369          list($current_email) = pwg_db_fetch_row(pwg_query($query)); 
    352        
    353           if ($_POST['mail_address'] != $current_email and ( isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 
     370 
     371          /* This is to send a new validation key */ 
     372          if ($_POST['mail_address'] != $current_email and (isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 
    354373         
    355374            $confirm_mail_need = true; 
     375 
     376          /* This is to set the user to "waiting" group or status until admin validation */ 
     377          if ($_POST['mail_address'] != $current_email and (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 
     378         
     379            setgroup($register_user['id']);// Set to "waiting" group or status until admin validation 
     380            $confirm_mail_need = false; 
    356381        } 
    357382         
Note: See TracChangeset for help on using the changeset viewer.