3 * Store the desired username during the login process
5 * It will be read by the Razer Forge TV when calling api/v1/gamers/me.
7 * @author Christian Weiske <cweiske@cweiske.de>
8 * @see api/razer/session
9 * @see api/v1/gamers/me
12 if (!isset($_POST['email'])) {
13 header('HTTP/1.0 400 Bad Request');
14 header('Content-type: application/json');
15 echo '{"error":{"message":"E-Mail missing","code": 2001}}' . "\n";
18 $email = $_POST['email'];
20 //we use the ouya username storage code here
21 // and simply use the part before the @ in the e-mail as username.
22 list($_POST['username']) = explode('@', $email);
23 require __DIR__ . '/../v1/sessions.php';