Choose Tribe when creating Users in Admin panel

This commit is contained in:
KFCSpike
2014-01-27 20:02:08 +00:00
parent ffd063362f
commit 5c1babcee9
2 changed files with 60 additions and 20 deletions
+12 -2
View File
@@ -18,6 +18,7 @@ $id = $_POST['id'];
$baseName = $_POST['users_base_name'];
$amount = (int) $_POST['users_amount'];
$beginnersProtection = $_POST['users_protection'];
$postTribe = $_POST['tribe'];
// Some basic error checking
if (strlen($baseName) < 4)
@@ -54,7 +55,16 @@ else
//$password = $baseName . $i . 'PASS';
$email = $baseName . $i . '@example.com';
$tribe = rand(1, 3);
if ($postTribe == 0)
{
// Random Tribe
$tribe = rand(1, 3);
}
else
{
// No error checking here but should be set to 1-3 from form
$tribe = $postTribe;
}
// Create in a random quad
$kid = rand(1,4);
// Dont need to activate, not 100% sure we need to initialise $act
@@ -120,6 +130,6 @@ else
}
}
}
header("Location: ../../../Admin/admin.php?p=addUsers&g=OK&bn=$baseName&am=$created&sk=$skipped&bp=$beginnersProtection");
header("Location: ../../../Admin/admin.php?p=addUsers&g=OK&bn=$baseName&am=$created&sk=$skipped&bp=$beginnersProtection&tr=$postTribe");
}
?>