forked from science-ation/science-ation
Fix sign up checks
This commit is contained in:
parent
f24a5653d9
commit
5680696c2e
@ -173,7 +173,7 @@ function mentorStatus($reg_id = '')
|
||||
$q->execute([$rid, $config['FAIRYEAR']]);
|
||||
|
||||
$r = $q->fetch(PDO::FETCH_OBJ);
|
||||
if ($r->nummentors === -1) {
|
||||
if ($r->nummentors === -1 or $r->nummentors == null) {
|
||||
return 'incomplete';
|
||||
}
|
||||
|
||||
|
@ -304,13 +304,12 @@ if (get_value_from_array($_POST, 'action') == 'login' && (get_value_from_array($
|
||||
$schoolidquery = 'null';
|
||||
|
||||
// actually insert it
|
||||
$stmt = $pdo->prepare('INSERT INTO registrations (num, email, start, status, schools_id, year) VALUES (?, ?, NOW(), ?, ?, ?)');
|
||||
$stmt = $pdo->prepare("INSERT INTO registrations (num, email, start, status, schools_id, year) VALUES (?, ?, NOW(), ?, $schoolidquery, ?)");
|
||||
|
||||
$stmt->execute([
|
||||
$regnum,
|
||||
$_SESSION['email'],
|
||||
'new',
|
||||
$schoolidquery,
|
||||
$config['FAIRYEAR']
|
||||
]);
|
||||
|
||||
|
@ -160,7 +160,7 @@ echo '<form name="nummentorsform" method="get" action="register_participants_men
|
||||
echo i18n('Number of mentors that helped with the project: ');
|
||||
echo "<select name=\"nummentors\" onchange=\"document.forms.nummentorsform.submit()\">\n";
|
||||
|
||||
if ($registrations_nummentors === -1) {
|
||||
if ($registrations_nummentors === -1 or $registrations_nummentors == null) {
|
||||
$sel = 'selected="selected"';
|
||||
} else
|
||||
$sel = '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user