diff --git a/api.php b/api.php index 53d56ae..9f8a351 100644 --- a/api.php +++ b/api.php @@ -849,12 +849,12 @@ switch($request[0]) { default: $ret['status']="error"; - $ret['error']="invalidi school API command ({$request[1]})"; + $ret['error']="invalid school API command ({$request[1]})"; } break; case 'project': - $chk=api_user_auth_required(); + $chk=api_user_auth_required('participant'); if($chk['status']!="ok") { $ret['status']="error"; $ret['error']=$chk['error']; diff --git a/register_participants_signature.php b/register_participants_signature.php index 5a1b614..bd0714a 100644 --- a/register_participants_signature.php +++ b/register_participants_signature.php @@ -41,14 +41,12 @@ exit; } - $q=mysql_query("SELECT registrations.id AS regid, students.id AS studentid, students.firstname - FROM registrations,students - WHERE students.email='{$_SESSION['email']}' - AND registrations.num='{$_SESSION['registration_number']}' + $q=mysql_query("SELECT registrations.id AS regid + FROM registrations + WHERE registrations.num='{$_SESSION['registration_number']}' AND registrations.id='{$_SESSION['registration_id']}' - AND students.registrations_id=registrations.id - AND registrations.conferences_id={$conference['id']} - AND students.conferences_id={$conference['id']}"); + AND registrations.conferences_id={$conference['id']}"); + $registration_number=$_SESSION['registration_number']; $registration_id=$_SESSION['registration_id'];