summaryrefslogtreecommitdiff
path: root/lib/api/kolab_api_service_form_value.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-03-14 12:19:45 (GMT)
committerAleksander Machniak <alec@alec.pl>2012-03-14 12:19:45 (GMT)
commitea6745b64f13f868ef269cfa3e38ffb2f215dc48 (patch)
treeebd032d80cc336a7e10bf20bf6decab6362e8d10 /lib/api/kolab_api_service_form_value.php
parentfa7994160bb410c1e8f35a0e91883b43b2ab9cfa (diff)
downloadkolab-wap-ea6745b64f13f868ef269cfa3e38ffb2f215dc48.tar.gz
Generate correct email address when sn is empty
Diffstat (limited to 'lib/api/kolab_api_service_form_value.php')
-rw-r--r--lib/api/kolab_api_service_form_value.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/kolab_api_service_form_value.php b/lib/api/kolab_api_service_form_value.php
index 0e481a4..2ada7a2 100644
--- a/lib/api/kolab_api_service_form_value.php
+++ b/lib/api/kolab_api_service_form_value.php
@@ -126,7 +126,8 @@ class kolab_api_service_form_value extends kolab_api_service
$givenname = preg_replace('/[^a-z-_]/i', '', $givenname);
$sn = preg_replace('/[^a-z-_]/i', '', $sn);
- $mail = $givenname . "." . $sn . "@" . $_SESSION['user']->get_domain();
+ $local = trim($givenname . '.' . $sn, '.');
+ $mail = $local . '@' . $_SESSION['user']->get_domain();
$orig_mail = $mail;