@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | if (!$this->configModel->updateConfig($update->name, $update->value)) { |
48 | 48 | $result['success'] = false; |
49 | 49 | $result['errorId'][] = $update->name; |
50 | - } else { |
|
50 | + }else { |
|
51 | 51 | $result['successId'][] = $update->name; |
52 | 52 | } |
53 | 53 | } |
@@ -59,15 +59,15 @@ discard block |
||
59 | 59 | * Send a test mail |
60 | 60 | * @throws JsonException |
61 | 61 | */ |
62 | - public function testMail(){ |
|
62 | + public function testMail() { |
|
63 | 63 | $this->onlyAdmin(); |
64 | 64 | $this->onlyPost(); |
65 | 65 | $result = array(); |
66 | 66 | $result['success'] = false; |
67 | - try{ |
|
67 | + try { |
|
68 | 68 | $this->sendMail->sendTestMail(); |
69 | 69 | $result['success'] = true; |
70 | - }catch (Swift_TransportException $e) { |
|
70 | + } catch (Swift_TransportException $e) { |
|
71 | 71 | $result['success'] = false; |
72 | 72 | } |
73 | 73 |
@@ -67,7 +67,7 @@ |
||
67 | 67 | try{ |
68 | 68 | $this->sendMail->sendTestMail(); |
69 | 69 | $result['success'] = true; |
70 | - }catch (Swift_TransportException $e) { |
|
70 | + } catch (Swift_TransportException $e) { |
|
71 | 71 | $result['success'] = false; |
72 | 72 | } |
73 | 73 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | // Create the Transport for mail sending |
27 | 27 | //$config = $this->siteConfig->getSiteConfig(); |
28 | 28 | $this->transport = (new Swift_SmtpTransport($this->siteConfig["SMTP_server"], |
29 | - (int)$this->siteConfig["SMTP_port"])) |
|
29 | + (int) $this->siteConfig["SMTP_port"])) |
|
30 | 30 | ->setUsername($this->siteConfig["SMTP_user"]) |
31 | 31 | ->setPassword($this->siteConfig["SMTP_pass"]); |
32 | 32 | |
@@ -68,11 +68,11 @@ discard block |
||
68 | 68 | public function sendResetPasswordMail(string $to, string $token, int $userId) |
69 | 69 | { |
70 | 70 | $url = $this->container->getRequest()->getBaseUrl(); |
71 | - $url .= "password/reset/get?token=" . $token; |
|
72 | - $url .= "&userId=" . $userId; |
|
71 | + $url .= "password/reset/get?token=".$token; |
|
72 | + $url .= "&userId=".$userId; |
|
73 | 73 | |
74 | - $message = "<h1>Message from <a href='" . $this->container->getRequest()->getBaseUrl() . "'>" . $this->siteConfig["site_name"] . "</a></h1>"; |
|
75 | - $message .= "<p>You have asked to reset your password, please click <a href=\"" . $url . "\">Here</a> to define a new password</p>"; |
|
74 | + $message = "<h1>Message from <a href='".$this->container->getRequest()->getBaseUrl()."'>".$this->siteConfig["site_name"]."</a></h1>"; |
|
75 | + $message .= "<p>You have asked to reset your password, please click <a href=\"".$url."\">Here</a> to define a new password</p>"; |
|
76 | 76 | |
77 | 77 | $this->send($to, "Define New Password", $message); |
78 | 78 | } |
@@ -86,14 +86,14 @@ discard block |
||
86 | 86 | public function sendNewPasswordMail(string $to, string $token, int $userId) |
87 | 87 | { |
88 | 88 | $url = $this->container->getRequest()->getBaseUrl(); |
89 | - $url .= "password/reset/get?token=" . $token; |
|
90 | - $url .= "&userId=" . $userId; |
|
91 | - $message = "<h1>Message from <a href='" . $this->container->getRequest()->getBaseUrl() . "'>" . $this->siteConfig["site_name"] . "</a></h1>"; |
|
89 | + $url .= "password/reset/get?token=".$token; |
|
90 | + $url .= "&userId=".$userId; |
|
91 | + $message = "<h1>Message from <a href='".$this->container->getRequest()->getBaseUrl()."'>".$this->siteConfig["site_name"]."</a></h1>"; |
|
92 | 92 | $message .= "<h2>Welcome to the site</h2>"; |
93 | - $message .= "<p>You have sucsessfuly created an account, now all you need to do is <a href=\"" . $url . "\">Create your new password</a></p>"; |
|
93 | + $message .= "<p>You have sucsessfuly created an account, now all you need to do is <a href=\"".$url."\">Create your new password</a></p>"; |
|
94 | 94 | $message .= "<p>Have fun</p>"; |
95 | 95 | |
96 | - $this->send($to, "Define Password at " . $this->siteConfig["site_name"], $message); |
|
96 | + $this->send($to, "Define Password at ".$this->siteConfig["site_name"], $message); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |