Nextrek
Diff Revisions
773
vs
800
for /Android/SmartCharging/endPoints/repositories/UserRepository.php
|
@@ -276,12 +276,17 @@ |
276 |
276 |
|
$u_last_name = $graphObject->getProperty('last_name'); |
277 |
277 |
|
$u_email = $graphObject->getProperty('email'); |
278 |
278 |
|
|
|
279 |
+ |
if (is_null($u_email)) { |
|
280 |
+ |
$u_email = $graphObject->getProperty('id')."@facebook.com"; |
|
281 |
+ |
} |
|
282 |
+ |
|
279 |
283 |
|
//$sql = "SELECT id, username FROM utente WHERE email='".$user_email."'"; |
280 |
284 |
|
$sql = "SELECT id, username FROM utente WHERE email=:email"; |
281 |
285 |
|
|
282 |
286 |
|
//$result = $this->db->query($sql); |
283 |
287 |
|
|
284 |
288 |
|
$stmt = $this->db->prepare($sql); |
|
289 |
+ |
|
285 |
290 |
|
$stmt->bindParam(':email', is_null($user_email) ? $u_email : $user_email); |
286 |
291 |
|
$stmt->execute(); |
287 |
292 |
|
|