@@ -45,9 +45,9 @@ discard block |
||
| 45 | 45 | $this->load->database(); |
| 46 | 46 | |
| 47 | 47 | $query = $this->db->select('*') |
| 48 | - ->from('auth_users') |
|
| 49 | - ->where('username', $username) |
|
| 50 | - ->get(); |
|
| 48 | + ->from('auth_users') |
|
| 49 | + ->where('username', $username) |
|
| 50 | + ->get(); |
|
| 51 | 51 | |
| 52 | 52 | return (bool) $query->num_rows(); |
| 53 | 53 | } |
@@ -69,9 +69,9 @@ discard block |
||
| 69 | 69 | $this->load->database(); |
| 70 | 70 | |
| 71 | 71 | $query = $this->db->select('email') |
| 72 | - ->from('auth_users') |
|
| 73 | - ->where('username', $identity) |
|
| 74 | - ->get(); |
|
| 72 | + ->from('auth_users') |
|
| 73 | + ->where('username', $identity) |
|
| 74 | + ->get(); |
|
| 75 | 75 | |
| 76 | 76 | if($query->num_rows() > 0) { |
| 77 | 77 | //username exists, grab email |
@@ -89,9 +89,9 @@ discard block |
||
| 89 | 89 | $user = NULL; |
| 90 | 90 | |
| 91 | 91 | $query = $this->db->select('*') |
| 92 | - ->from('auth_users') |
|
| 93 | - ->where('username', $username) |
|
| 94 | - ->get(); |
|
| 92 | + ->from('auth_users') |
|
| 93 | + ->where('username', $username) |
|
| 94 | + ->get(); |
|
| 95 | 95 | |
| 96 | 96 | if($query->num_rows() > 0) { |
| 97 | 97 | $user = $query->row(); |
@@ -120,12 +120,12 @@ discard block |
||
| 120 | 120 | $api_key = NULL; |
| 121 | 121 | if($this->logged_in()) { |
| 122 | 122 | $this->db->select('api_key') |
| 123 | - ->where('id', $this->User->id) |
|
| 124 | - ->get('auth_users'); |
|
| 123 | + ->where('id', $this->User->id) |
|
| 124 | + ->get('auth_users'); |
|
| 125 | 125 | |
| 126 | 126 | $query = $this->db->select('api_key') |
| 127 | - ->where('id', $this->User->id) |
|
| 128 | - ->get('auth_users'); |
|
| 127 | + ->where('id', $this->User->id) |
|
| 128 | + ->get('auth_users'); |
|
| 129 | 129 | |
| 130 | 130 | if($query->num_rows() > 0) { |
| 131 | 131 | $api_key = $query->row('api_key'); |
@@ -137,9 +137,9 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | public function get_id_from_api_key(string $api_key) { |
| 139 | 139 | $query = $this->db->select('id') |
| 140 | - ->from('auth_users') |
|
| 141 | - ->where('api_key', $api_key) |
|
| 142 | - ->get(); |
|
| 140 | + ->from('auth_users') |
|
| 141 | + ->where('api_key', $api_key) |
|
| 142 | + ->get(); |
|
| 143 | 143 | |
| 144 | 144 | if($query->num_rows() > 0) { |
| 145 | 145 | $userID = $query->row('id'); |
@@ -201,12 +201,12 @@ discard block |
||
| 201 | 201 | } |
| 202 | 202 | public function hideLatestNotice() { |
| 203 | 203 | $idQuery = $this->db->select('1') |
| 204 | - ->where('user_id', $this->User->id) |
|
| 205 | - ->get('tracker_user_notices'); |
|
| 204 | + ->where('user_id', $this->User->id) |
|
| 205 | + ->get('tracker_user_notices'); |
|
| 206 | 206 | if($idQuery->num_rows() > 0) { |
| 207 | 207 | $success = (bool) $this->db->set('hidden_notice_id', '(SELECT id FROM tracker_notices ORDER BY id DESC LIMIT 1)', FALSE) |
| 208 | - ->where('user_id', $this->User->id) |
|
| 209 | - ->update('tracker_user_notices'); |
|
| 208 | + ->where('user_id', $this->User->id) |
|
| 209 | + ->update('tracker_user_notices'); |
|
| 210 | 210 | } else { |
| 211 | 211 | $success = (bool) $this->db->insert('tracker_user_notices', [ |
| 212 | 212 | 'user_id' => $this->User->id, |