@@ -5,7 +5,7 @@ |
||
5 | 5 | use Core\Constant; |
6 | 6 | use \Core\Container; |
7 | 7 | |
8 | -class Debug extends Module{ |
|
8 | +class Debug extends Module { |
|
9 | 9 | |
10 | 10 | /** |
11 | 11 | * Var dump a var |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | //check if email is valid for sanity |
172 | 172 | if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { |
173 | 173 | $email = htmlspecialchars($email); |
174 | - throw new BlogocException("invalid email " . $email); |
|
174 | + throw new BlogocException("invalid email ".$email); |
|
175 | 175 | } |
176 | 176 | $sql = $this->baseSqlSelect(); |
177 | 177 | $sql .= " |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | $this->bind(':roles_idroles', 1); //we set to one, should probably get from database and config |
215 | 215 | $this->execute(); |
216 | 216 | |
217 | - return (int)$this->dbh->lastInsertId(); |
|
217 | + return (int) $this->dbh->lastInsertId(); |
|
218 | 218 | } |
219 | 219 | |
220 | 220 | /** |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | */ |
225 | 225 | public function updateUser(\stdClass $user) |
226 | 226 | { |
227 | - $sql=" |
|
227 | + $sql = " |
|
228 | 228 | UPDATE $this->userTbl |
229 | 229 | SET |
230 | 230 | name=:name, |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | } |
275 | 275 | |
276 | 276 | if ($this->isAccountPasswordBlocked($user)) { |
277 | - $response->message = "too many bad passwords, account is blocked for " . Constant::LOCKOUT_MINUTES . " minutes"; |
|
277 | + $response->message = "too many bad passwords, account is blocked for ".Constant::LOCKOUT_MINUTES." minutes"; |
|
278 | 278 | return $response; |
279 | 279 | } |
280 | 280 |
@@ -93,14 +93,14 @@ |
||
93 | 93 | $this->onlyUser(); |
94 | 94 | $this->onlyPost(); |
95 | 95 | |
96 | - $user = (object)$this->request->getDataFull(); |
|
96 | + $user = (object) $this->request->getDataFull(); |
|
97 | 97 | $redirectUrl = "/admin"; |
98 | 98 | |
99 | 99 | if ($user->userId !== $this->session->get("userId") || isset($user->userRoleSelector)) { |
100 | 100 | //an admin is trying to update a user or form tampered with |
101 | 101 | $this->onlyAdmin(); |
102 | - $redirectUrl = "/admin/home/view-user/" . $user->userId; |
|
103 | - } else { |
|
102 | + $redirectUrl = "/admin/home/view-user/".$user->userId; |
|
103 | + }else { |
|
104 | 104 | //set the role to the original state for update |
105 | 105 | $beforeUser = $this->userModel->getUserDetailsById($user->userId); |
106 | 106 | $user->userRoleSelector = $beforeUser->roles_idroles; |