From a1765760fcc5437de521646fe23bf9a724d4ae85 Mon Sep 17 00:00:00 2001
From: Nicolas Dubois <nicdub@gmx.ch>
Date: Tue, 10 Sep 2019 16:58:38 +0200
Subject: [PATCH] Tequila - Replace "user" by "email" to allow epfl account to
 postulate

---
 canapEPFL/form.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/canapEPFL/form.php b/canapEPFL/form.php
index 810ac0b..b4e6d69 100644
--- a/canapEPFL/form.php
+++ b/canapEPFL/form.php
@@ -2,11 +2,11 @@
   require_once("tequila/tequila.php");
   $oClient = new TequilaClient();
   $oClient->SetApplicationName('Formulaire apprentissage');
-  $oClient->SetWantedAttributes(array('uniqueid','firstname','name'));
-  $oClient->SetWishedAttributes(array('user'));
+  $oClient->SetWantedAttributes(array('uniqueid','firstname','name', 'email'));
+  // $oClient->SetWishedAttributes(array('user'));
   $oClient->SetAllowsFilter('categorie=epfl-guests');
   $oClient->Authenticate();
-  $user = $oClient->getValue('user');
+  $user = $oClient->getValue('email');
   $firstname = $oClient->getValue('firstname');
   $name = $oClient->getValue('name');
   $guest_sciper = $oClient->getValue('uniqueid');
-- 
GitLab