1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-25 02:34:31 +01:00

Merge pull request #3 from kounoike/pr/maxuidnumber

maxuid is not 'max' in lcUidNumber
This commit is contained in:
Carpentier Pierre-Francois 2016-06-19 11:25:59 +02:00 committed by GitHub
commit 8c50313b5a

View File

@ -24,7 +24,7 @@ function lcMail(firstname, lastname, domain){
function lcUidNumber(firstname, lastname, minuid, maxuid){
var iminuid = parseInt(minuid);
var imaxuid = parseInt(maxuid);
return (parseInt('0x'+sha1(firstname+lastname)) % imaxuid) + iminuid;
return (parseInt('0x'+sha1(firstname+lastname)) % (imaxuid - iminuid)) + iminuid;
}
function lcHomeDir(firstname, lastname, basedir){