demo account creation is now a checkbox option, on by default

This commit is contained in:
Miles Lott 2001-08-25 21:18:30 +00:00
parent 265db7f0c7
commit eb429ea494
2 changed files with 52 additions and 43 deletions

View File

@ -55,6 +55,7 @@
$setup_tpl->set_var('adminlastname',lang('Admin last name'));
$setup_tpl->set_var('adminpassword',lang('Admin password'));
$setup_tpl->set_var('adminpassword2',lang('Re-enter password'));
$setup_tpl->set_var('create_demo_accounts',lang('Create demo accounts'));
$setup_tpl->set_var('lang_submit',lang('submit'));
$setup_tpl->pparse('out','T_setup_demo');
@ -94,6 +95,9 @@
$sql .= "values (".$admingroupid.", 'Admins', 'g', '".md5($passwd)."', 'Admin', 'Group', ".time().", 'A')";
$phpgw_setup->db->query($sql);
/* Creation of the demo accounts is now optional - the checkbox is on by default. */
if ($create_demo)
{
/* Create records for demo accounts */
$accountid = mt_rand (100, 600000);
$sql = "insert into phpgw_accounts";
@ -139,6 +143,7 @@
$phpgw_setup->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('email', 'run', ".$accountid.", 1)");
$phpgw_setup->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('notes', 'run', ".$accountid.", 1)");
$phpgw_setup->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('todo', 'run', ".$accountid.", 1)");
}
/* Create records for administrator account */
$accountid = mt_rand (100, 600000);

View File

@ -31,6 +31,10 @@
<td>{adminpassword2}</td>
<td><input type="password" name="passwd2"></td>
</tr>
<tr>
<td>{create_demo_accounts}</td>
<td><input type="checkbox" name="create_demo" checked></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="submit" value="{lang_submit}"> </td>
</tr>