#!/usr/bin/php name, modules::pseudoModules) && !$mod->getInstances()) { print "Install module ".$mod->name."..."; $mod->save(); print "OK\n"; } } if (company::getCount()==0) { $c = new fox\company(); $c->name="Default company"; $c->qName="Company"; print "Create company ".$c->name."..."; $c->save(); print "OK\n"; } // create user if (user::getCount()==0 && userGroup::getCount()==0) { $u = new fox\user(); $u->fullName="Administrator"; $u->login=$initUser; $u->setPassword($initPass); $u->authType="internal"; print "Create user ".$u->login."..."; $u->save(); print "OK\n"; $ug = new fox\userGroup(); $ug->name="Administrators"; $ug->addAccessRule("isRoot"); print "Create usergroup ".$ug->name."..."; $ug->save(); print "OK\n"; print "Join user into ".$u->login." group ".$ug->name."..."; $ug->join($u); print "OK\n"; } ?>