summaryrefslogtreecommitdiff
path: root/program/include/rcmail.php
diff options
context:
space:
mode:
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r--program/include/rcmail.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index f109c16fd..71601b526 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -453,9 +453,10 @@ class rcmail
$username .= '@'.$config['username_domain'];
}
- // try to resolve email address from virtuser table
- if (!empty($config['virtuser_file']) && strpos($username, '@'))
- $username = rcube_user::email2user($username);
+ // try to resolve email address from virtuser table
+ if (strpos($username, '@'))
+ if ($virtuser = rcube_user::email2user($username))
+ $username = $virtuser;
// lowercase username if it's an e-mail address (#1484473)
if (strpos($username, '@'))