1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-22 01:14:21 +01:00

maxuid is not 'max'.

This commit is contained in:
Yuusuke KOUNOIKE 2016-06-19 01:48:50 +09:00
parent c67969e2c1
commit 268c8f935b

View File

@ -24,7 +24,7 @@ function lcMail(firstname, lastname, domain){
function lcUidNumber(firstname, lastname, minuid, maxuid){ function lcUidNumber(firstname, lastname, minuid, maxuid){
var iminuid = parseInt(minuid); var iminuid = parseInt(minuid);
var imaxuid = parseInt(maxuid); 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){ function lcHomeDir(firstname, lastname, basedir){