From: hickert Date: Fri, 27 Aug 2010 15:06:41 +0000 (+0000) Subject: Fixed uid generation X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ef1c243de53e7c2922dce5d377530c5a2bb7c5c5;p=gosa.git Fixed uid generation -Remove accents before creation uid proposals for user-templates git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@19483 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index f2e0a9111..7dceb91c9 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -2103,6 +2103,13 @@ function gen_uids($rule, $attributes) { global $config; + // Strip out non ascii chars + foreach($attributes as $name => $value){ + $value = iconv('UTF-8', 'US-ASCII//TRANSLIT', $value); + $value = preg_replace('/[^(\x20-\x7F)]*/','',$value); + $attributes[$name] = $value; + } + /* Search for keys and fill the variables array with all possible values for that key. */ $part= "";