Add seeding of random number - randomizing going away soon, but....

This commit is contained in:
Miles Lott 2001-03-14 18:55:36 +00:00
parent 7791256228
commit ee62c1c62d

View File

@ -91,6 +91,7 @@
if (! $error) {
// Create the 'Default' group
mt_srand((double)microtime()*1000000);
$defaultgroupid = mt_rand (100, 65535);
$acct = CreateObject('phpgwapi.accounts',$defaultgroupid);
@ -107,6 +108,7 @@
if(!$id_exist) {
$acct->create('g','Default',$passwd,'Default','Group','A',$defaultgroupid);
} else {
// Delete first, so ldap does not return an error, then recreate
$acct->delete($defaultgroupid);
$acct->create('g','Default',$passwd,'Default','Group','A',$defaultgroupid);
}