Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't accidentally prompt people to make a second account #594

Merged
merged 3 commits into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions gatherling/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@

case 'eventinfo':
case 'event_info':
$eventname = $_REQUEST['event'];
$event = new Event($eventname);
$result = repr_json_event($event);
if (Event::exists(arg('event'))) {
$event = new Event(arg('event'));
$result = repr_json_event($event);
} else {
$result['error'] = 'Event not found';
}
break;

case 'seriesinfo':
Expand All @@ -47,6 +50,7 @@

case 'addplayer':
case 'add_player':
auth();
$event = new Event(arg('event'));
$player = arg('addplayer');
$decklist = arg('decklist', '');
Expand Down
3 changes: 3 additions & 0 deletions gatherling/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ function prompt_link_account($user)

<form action="register.php" method="post">
<table class="form" align="center" style="border-width: 0px" cellpadding="3">
<tr>
<td colspan="2">If you already have a Gatherling account, please <a href="login.php?target=auth.php">Log In</a> in with your password, and link via Player Settings.</td>
</tr>
<tr>
<th>Username</th>
<td><input id="username" class="inputbox" type="text" name="username" value="" tabindex="1"></td>
Expand Down
Loading