summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2012-08-27 21:32:32 +0200
committerArthur Schiwon <blizzz@owncloud.com>2012-08-27 21:32:56 +0200
commit5985d00c6f451ef67cc998be538ecff8ff840192 (patch)
tree626494e47b8aac9d3106416fea812757d801203b
parent84a5faff36c9afb550db05091341bc08bcb9b57d (diff)
downloadnextcloud-server-5985d00c6f451ef67cc998be538ecff8ff840192.tar.gz
nextcloud-server-5985d00c6f451ef67cc998be538ecff8ff840192.zip
LDAP: transliterate other latin characters to ASCII when creating owncloud names. Already created usernames are not being affected.
-rw-r--r--apps/user_ldap/lib/access.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index ec3b5264915..68df4c4cb93 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -564,6 +564,10 @@ abstract class Access {
return $name;
}
+ // Translitaration
+ //latin characters to ASCII
+ $name = iconv('UTF-8', 'ASCII//TRANSLIT', $name);
+
//REPLACEMENTS
$name = \OCP\Util::mb_str_replace(' ', '_', $name, 'UTF-8');