Update of /cvsroot/webware/Webware/UserKit
In directory usw-pr-cvs1:/tmp/cvs-serv4382
Modified Files:
User.py
Log Message:
switched externalId generation over to the harder-to-guess uniqueId()
Index: User.py
===================================================================
RCS file: /cvsroot/webware/Webware/UserKit/User.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** User.py 2001/07/26 01:19:39 1.6
--- User.py 2001/11/12 13:00:16 1.7
***************
*** 1,4 ****
from MiscUtils import NoDefault
! import time, whrandom
--- 1,5 ----
from MiscUtils import NoDefault
! from MiscUtils.Funcs import uniqueId
! import time
***************
*** 48,55 ****
if self._externalId is None:
from time import localtime, time
- prefix = ''.join([('%02d'%x) for x in localtime(time())[:6]])
attempts = 0
while attempts<10000:
! self._externalId = prefix + str(whrandom.randint(10000, 99999))
# @@ 2001-02-17 ce: check that manager doesn't already have this
# if mgr.userForExternalId(self._externalId, None) is None:
--- 49,55 ----
if self._externalId is None:
from time import localtime, time
attempts = 0
while attempts<10000:
! self._externalId = uniqueId(self)
# @@ 2001-02-17 ce: check that manager doesn't already have this
# if mgr.userForExternalId(self._externalId, None) is None:
|