Subversion Repository Public Repository

Nextrek

Diff Revisions 537 vs 538 for /Android/SmartCharging/endPoints/nightly/repositories/UserRepository.php

Diff revisions: vs.
  @@ -88,7 +88,7 @@
88 88 $status = array();
89 89
90 90 try {
91 - $query = "SELECT id, password, email, is_owner FROM utente WHERE username='".$username."'";
91 + $query = "SELECT id, password, email, is_owner FROM utente WHERE username='".$username."' AND is_active=1";
92 92 $result = $this->db->query($query);
93 93 $row = ($result->rowCount()>0) ? $result->fetch() : null;
94 94
  @@ -339,7 +339,9 @@
339 339
340 340 public function deleteUser($user_id) {
341 341 $status = array();
342 - $query = "DELETE FROM utente WHERE id=".$user_id;
342 + $query = "UPDATE utente
343 + SET is_active=0, token=''
344 + WHERE id=".$user_id;
343 345
344 346 try {
345 347 $this->db->exec($query);