Changeset 2621


Ignore:
Timestamp:
12/01/09 00:53:36 (3 years ago)
Author:
benjamin
Message:

Fixes #1186 : We trim spaces when adding or editing email addresses (and aliases too)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • alternc/trunk/bureau/class/m_mail.php

    r2616 r2621  
    291291    global $err,$cuid,$db,$admin; 
    292292    $err->log("mail","put_mail_details",$mail); 
    293     $mail=strtolower($mail); 
     293    $mail=trim(strtolower($mail)); // remove spaces also 
    294294    $t=explode("@",$mail); 
    295     $email=$t[0]; 
     295    $email=trim($t[0]); // remove spaces also 
    296296    $dom=$t[1]; 
    297297 
     
    313313        reset($a); 
    314314        for ($i=0;$i<count($a);$i++){ 
    315           $a[$i]=trim($a[$i]); 
     315          $a[$i]=trim($a[$i]); // remove spaces 
    316316          if ($a[$i]){ 
    317317            if(checkmail($a[$i])>1){ 
     
    378378    $err->log("mail","add_mail",$dom."/".$mail); 
    379379    $account=array(); 
    380     $mail=strtolower($mail); 
     380    $mail=trim(strtolower($mail)); // remove spaces also 
    381381    if ($pop) $pop="1"; else $pop="0"; 
    382382    if ($mail) { 
Note: See TracChangeset for help on using the changeset viewer.