don't force the user to select a family if there's only one family... so we can basically ignore families

This commit is contained in:
Ryan Walberg 2012-12-06 03:03:22 +00:00
parent 092e0c65b9
commit 221b4c2df8
3 changed files with 24 additions and 12 deletions

View file

@ -95,11 +95,16 @@ while ($row = $stmt->fetch()) {
$families[] = $row;
}
if (count($families) == 1) {
// default the family to the single family we have.
$familyid = $families[0]["familyid"];
}
$smarty->assign('families', $families);
$smarty->assign('username', $username);
$smarty->assign('fullname', $fullname);
$smarty->assign('email', $email);
$smarty->assign('familyid', $familyid);
$smarty->assign('familycount', count($families));
$smarty->assign('action', $_POST["action"]);
if (isset($error)) {
$smarty->assign('error', $error);