Skip to content
Snippets Groups Projects
Commit be556530 authored by Ubbo Veentjer's avatar Ubbo Veentjer
Browse files

cors header for insertrequest

git-svn-id: https://textgridlab.org/svn/textgrid/trunk/middleware/tgauth@13671 7c539038-3410-0410-b1ec-0f2a7bf1c452
parent 629f28d2
No related branches found
No related tags found
No related merge requests found
<?php
// tell client, he hit correct endpoint ...
header("X-ATEndpoint: YES");
// should be www.textgrid.de
header("Access-Control-Allow-Origin: *");
include '../conf/config.inc.php';
include '../include/config.inc.php';
include '../include/tgSqliteDB.class.php';
include '../include/tgLdap.class.php';
include '../include/tgImap.class.php';
......@@ -20,9 +22,16 @@ if (get_magic_quotes_gpc()) {
/**
* Validation
*/
*/
//print_r($_POST);
//echo $data;
$in = json_decode($data, TRUE);
$out['status'] = 'validating';
//print_r($in);
//echo $in['email'];
// email already used? -> query ldap
if($ldap->emailExists($in['email'])) {
$out['error']['email'] = "registered";
......@@ -43,6 +52,8 @@ if($out['error']) {
* validation done, request -> db, mail to user and ...
*/
//print_r($db->getUserRequests());
$db->insertUserRequest($in);
// send email
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment