Nextrek
Diff Revisions
223
vs
224
for /Android/SmartCharging/endPoints/UserRepository.php
|
@@ -32,35 +32,6 @@ |
32 |
32 |
|
} |
33 |
33 |
|
|
34 |
34 |
|
} |
35 |
|
- |
|
36 |
|
- |
public function registerLocal($local, $password) { |
37 |
|
- |
$hashedPwd = password_hash($password, PASSWORD_DEFAULT); |
38 |
|
- |
|
39 |
|
- |
$query = "INSERT INTO locale(nominativo, cell, email, nomelocale, descrizione, tipologia, img1, img2, username, password, lat, lon) |
40 |
|
- |
VALUES ('".$local->nominativo."', |
41 |
|
- |
'".$local->cell."', |
42 |
|
- |
'".$local->email."', |
43 |
|
- |
'".$local->nomelocale."', |
44 |
|
- |
'".$local->descrizione."', |
45 |
|
- |
'".$local->tipologia."', |
46 |
|
- |
'".$local->img1."', |
47 |
|
- |
'".$local->img2."', |
48 |
|
- |
'".$local->username."', |
49 |
|
- |
'".$hashedPwd."', |
50 |
|
- |
'".$local->lat."', |
51 |
|
- |
'".$local->lon."')"; |
52 |
|
- |
|
53 |
|
- |
//echo "<br/>".$query."<br/>"; |
54 |
|
- |
|
55 |
|
- |
try { |
56 |
|
- |
$this->db->exec($query); |
57 |
|
- |
return $this->db->lastInsertId(); |
58 |
|
- |
|
59 |
|
- |
//echo "New record created successfully"; |
60 |
|
- |
} catch (PDOException $e) { |
61 |
|
- |
echo $e->getMessage(); |
62 |
|
- |
} |
63 |
|
- |
} |
64 |
35 |
|
} |
65 |
36 |
|
|
66 |
37 |
|
?> |