@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | public function actionBlog() |
56 | 56 | { |
57 | 57 | $time = Yii::$container->get(\common\interfaces\TimeInterface::class); |
58 | - $key = "index_blog_".$time->getLocalDate('UTC'); |
|
58 | + $key = "index_blog_" . $time->getLocalDate('UTC'); |
|
59 | 59 | $posts = Yii::$app->cache->get($key); |
60 | - if($posts === false) { |
|
60 | + if ($posts === false) { |
|
61 | 61 | $posts = \Yii::$app->getModule('blog') |
62 | 62 | ->fetch() |
63 | 63 | ->parse() |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | { |
91 | 91 | $model = new \site\models\ContactForm(); |
92 | 92 | if ($model->load(Yii::$app->request->post()) && $model->validate()) { |
93 | - if($model->sendEmail(Yii::$app->params['adminEmail'])) { |
|
93 | + if ($model->sendEmail(Yii::$app->params['adminEmail'])) { |
|
94 | 94 | Yii::$app->session->setFlash('success', 'Thank you for contacting us. We will respond to you as soon as possible.'); |
95 | 95 | } else { |
96 | 96 | Yii::$app->session->setFlash('error', 'There was an error sending email.'); |
@@ -121,10 +121,10 @@ discard block |
||
121 | 121 | public function actionSignup() |
122 | 122 | { |
123 | 123 | $model = Yii::$container->get(\site\models\SignupForm::class); |
124 | - if($model->load(Yii::$app->request->post()) && $model->validate()) { |
|
124 | + if ($model->load(Yii::$app->request->post()) && $model->validate()) { |
|
125 | 125 | $model->signup(); |
126 | 126 | Yii::$app->session->setFlash('success', "We have sent a verification email to the email address you provided.<br /><br />Please check your inbox and follow the instructions to verify your account. If the email does not arrive please check your spam folder."); |
127 | - return $this->redirect('/',302); |
|
127 | + return $this->redirect('/', 302); |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | return $this->render('signup', [ |
@@ -135,10 +135,10 @@ discard block |
||
135 | 135 | public function actionRequestPasswordReset() |
136 | 136 | { |
137 | 137 | $model = Yii::$container->get(\site\models\PasswordResetRequestForm::class); |
138 | - if($model->load(Yii::$app->request->post()) && $model->validate()) { |
|
139 | - if(!$model->sendEmail()) { |
|
138 | + if ($model->load(Yii::$app->request->post()) && $model->validate()) { |
|
139 | + if (!$model->sendEmail()) { |
|
140 | 140 | $ip = Yii::$app->getRequest()->getUserIP() ?: "UNKNOWN"; |
141 | - Yii::warning("$ip has tried to reset the password for ".$model->email); |
|
141 | + Yii::warning("$ip has tried to reset the password for " . $model->email); |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | Yii::$app->session->setFlash('success', 'If there is an account with the submitted email address you will receive further instructions in your email inbox.<br /><br />If the email does not arrive please check your spam folder.'); |
@@ -182,14 +182,14 @@ discard block |
||
182 | 182 | throw new BadRequestHttpException("Wrong or expired email verification token. If you aren't sure why this error occurs perhaps you've already verified your account. Please try logging in."); |
183 | 183 | } |
184 | 184 | |
185 | - if($user->isTokenConfirmed($user->verify_email_token)) { |
|
185 | + if ($user->isTokenConfirmed($user->verify_email_token)) { |
|
186 | 186 | Yii::$app->session->setFlash('success', 'Your account has already been verified. Please log in.'); |
187 | - return $this->redirect('/login',302); |
|
187 | + return $this->redirect('/login', 302); |
|
188 | 188 | } else if (Yii::$app->getUser()->login($user)) { |
189 | 189 | $user->confirmVerifyEmailToken(); |
190 | 190 | $user->save(); |
191 | 191 | Yii::$app->session->setFlash('success', 'Your account has been verified. Please continue with your check-in.'); |
192 | - return $this->redirect('/welcome',302); |
|
192 | + return $this->redirect('/welcome', 302); |
|
193 | 193 | } |
194 | 194 | } |
195 | 195 |