Nextrek
Diff Revisions
508
vs
512
for /Android/SmartCharging/endPoints/nightly/repositories/UserRepository.php
|
@@ -160,7 +160,7 @@ |
160 |
160 |
|
$response = $request->execute(); |
161 |
161 |
|
$graphObject = $response->getGraphObject(); |
162 |
162 |
|
|
163 |
|
- |
if ($obj->user_id != $graphObject->getProperty('id')) { //Il token ricevuto non coincide con quello di FB |
|
163 |
+ |
if ($fb_user != $graphObject->getProperty('id')) { //Il token ricevuto non coincide con quello di FB |
164 |
164 |
|
$status["return"] = 1; |
165 |
165 |
|
$status["id"] = -1; |
166 |
166 |
|
$status["token"] = ""; |
|
@@ -187,10 +187,10 @@ |
187 |
187 |
|
|
188 |
188 |
|
} else { //creazione nuova utenza |
189 |
189 |
|
|
190 |
|
- |
$sql = "INSERT INTO users (nome,cognome,email,token) |
|
190 |
+ |
$sql = "INSERT INTO utente (nome,cognome,email,token) |
191 |
191 |
|
VALUES ('".$u_first_name."','".$u_last_name."','".$u_email."','".$fb_token."')"; |
192 |
192 |
|
|
193 |
|
- |
$this->db->exec($query); |
|
193 |
+ |
$this->db->exec($sql); |
194 |
194 |
|
$status["id"] = $this->db->lastInsertId(); |
195 |
195 |
|
|
196 |
196 |
|
} |