#6 fix case insenstivie search

This commit is contained in:
Synox 2016-12-19 17:30:08 +01:00
parent 210ce01514
commit a8f8748e06

View File

@ -68,6 +68,7 @@ function search_mails($address, $mailbox) {
* @return clean username
*/
function clean_name($username) {
$username = strtolower($username);
$username = preg_replace('/@.*$/', "", $username); // remove part after @
$username = preg_replace('/[^A-Za-z0-9_.+-]/', "", $username); // remove special characters
return $username;