From 00f6ca70d381e8167b8b67a47cdf2f4bd8866d92 Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Mon, 30 Nov 2009 23:53:36 +0000 Subject: [PATCH] Fixes #1186 : We trim spaces when adding or editing email addresses (and aliases too) --- bureau/class/m_mail.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bureau/class/m_mail.php b/bureau/class/m_mail.php index 6e6da024..ef01e274 100644 --- a/bureau/class/m_mail.php +++ b/bureau/class/m_mail.php @@ -290,9 +290,9 @@ class m_mail { function put_mail_details($mail,$pop,$pass,$alias) { global $err,$cuid,$db,$admin; $err->log("mail","put_mail_details",$mail); - $mail=strtolower($mail); + $mail=trim(strtolower($mail)); // remove spaces also $t=explode("@",$mail); - $email=$t[0]; + $email=trim($t[0]); // remove spaces also $dom=$t[1]; $account=array(); @@ -312,7 +312,7 @@ class m_mail { if (count($a)>0) { reset($a); for ($i=0;$i1){ $err->raise("mail",14); @@ -377,7 +377,7 @@ class m_mail { global $quota,$err,$cuid,$db,$admin; $err->log("mail","add_mail",$dom."/".$mail); $account=array(); - $mail=strtolower($mail); + $mail=trim(strtolower($mail)); // remove spaces also if ($pop) $pop="1"; else $pop="0"; if ($mail) { if (!checkloginmail($mail)) {