@@ -36,9 +36,9 @@ discard block |
||
36 | 36 | $this->config = $this->siteConfig->getSiteConfig(); |
37 | 37 | $this->userModel = new UserModel($this->container); |
38 | 38 | $this->postModel = new PostModel($this->container); |
39 | - if($this->auth->isuser()) |
|
39 | + if ($this->auth->isuser()) |
|
40 | 40 | { |
41 | - $this->data["user"] = $this->userModel->getUserDetailsById((int)$this->session->get("userId")); |
|
41 | + $this->data["user"] = $this->userModel->getUserDetailsById((int) $this->session->get("userId")); |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | private function testCapcha(string $gCapchaResponse):bool |
51 | 51 | { |
52 | 52 | $error = false; |
53 | - if(Config::GOOGLE_RECAPCHA_PUBLIC_KEY !== "" && Config::GOOGLE_RECAPCHA_SECRET_KEY !== "") |
|
53 | + if (Config::GOOGLE_RECAPCHA_PUBLIC_KEY !== "" && Config::GOOGLE_RECAPCHA_SECRET_KEY !== "") |
|
54 | 54 | { |
55 | - if(empty($gCapchaResponse)) |
|
55 | + if (empty($gCapchaResponse)) |
|
56 | 56 | { |
57 | 57 | $error = true; |
58 | 58 | $this->alertBox->setAlert('Capcha not set', 'error'); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $grequest = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.Config::GOOGLE_RECAPCHA_SECRET_KEY.'&response='.$gCapchaResponse); |
62 | 62 | // The result is in a JSON format. Decoding.. |
63 | 63 | $gresponse = json_decode($grequest); |
64 | - if(!$gresponse->success) |
|
64 | + if (!$gresponse->success) |
|
65 | 65 | { |
66 | 66 | $error = true; |
67 | 67 | $this->alertBox->setAlert('Capcha Error', 'error'); |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | |
160 | 160 | $capchaError = $this->testCapcha($message["g-recaptcha-response"]); |
161 | 161 | |
162 | - if($capchaError === true) |
|
162 | + if ($capchaError === true) |
|
163 | 163 | { |
164 | 164 | $error = true; |
165 | 165 | } |