Skip to content

Commit 6ae4e6d

Browse files
bryank-cssimonLeary42
authored andcommitted
gecos ascii
1 parent 965e5bd commit 6ae4e6d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

resources/lib/UnityUser.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ public function init($send_mail = true)
7171
$ldapUserEntry->setAttribute("uid", $this->uid);
7272
$ldapUserEntry->setAttribute("givenname", $this->getFirstname());
7373
$ldapUserEntry->setAttribute("sn", $this->getLastname());
74-
$ldapUserEntry->setAttribute("gecos", "{$this->getFirstname()} {$this->getLastname()}");
74+
$ldapUserEntry->setAttribute(
75+
"gecos",
76+
transliterator_transliterate("Latin-ASCII", "{$this->getFirstname()} {$this->getLastname()}")
77+
);
7578
$ldapUserEntry->setAttribute("mail", $this->getMail());
7679
$ldapUserEntry->setAttribute("o", $this->getOrg());
7780
$ldapUserEntry->setAttribute("homedirectory", self::HOME_DIR . $this->uid);

0 commit comments

Comments
 (0)