diff --git a/gatherling/api.php b/gatherling/api.php index f0e7e748a..d88b02b32 100644 --- a/gatherling/api.php +++ b/gatherling/api.php @@ -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': @@ -47,6 +50,7 @@ case 'addplayer': case 'add_player': + auth(); $event = new Event(arg('event')); $player = arg('addplayer'); $decklist = arg('decklist', ''); diff --git a/gatherling/auth.php b/gatherling/auth.php index b858c8e5f..02248866a 100644 --- a/gatherling/auth.php +++ b/gatherling/auth.php @@ -151,6 +151,9 @@ function prompt_link_account($user)
+ + +
If you already have a Gatherling account, please Log In in with your password, and link via Player Settings.
Username