summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/access.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap/lib/access.php')
-rw-r--r--apps/user_ldap/lib/access.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index a7611eb3e84..04f73cf01fe 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -441,8 +441,8 @@ abstract class Access {
//while loop is just a precaution. If a name is not generated within
//20 attempts, something else is very wrong. Avoids infinite loop.
while($attempts < 20){
- $altName = $name . '_' . uniqid();
- if(\OCP\User::userExists($altName)) {
+ $altName = $name . '_' . rand(1000,9999);
+ if(!\OCP\User::userExists($altName)) {
return $altName;
}
$attempts++;