@@ -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 |
@@ -24,11 +24,11 @@ |
||
24 | 24 | <h1>Sign up</h1> |
25 | 25 | <p>To do a check-in you need an account. But don't worry -- <?= Html::a("we won't do anything with your data", ['site/faq']) ?>.</p> |
26 | 26 | <?php $form = ActiveForm::begin([ |
27 | - 'id' => 'form-signup', |
|
28 | - 'enableClientValidation' => true, |
|
27 | + 'id' => 'form-signup', |
|
28 | + 'enableClientValidation' => true, |
|
29 | 29 | 'enableAjaxValidation' => false, |
30 | 30 | 'options' => [ 'validateOnSubmit' => true ] |
31 | - ]); ?> |
|
31 | + ]); ?> |
|
32 | 32 | <?= $form->field($model, 'email', ['inputTemplate' => '<div class="input-group"><span class="input-group-addon">@</span>{input}</div>'])->input('email') ?> |
33 | 33 | <?= $form->field($model, 'password', ['inputTemplate' => '<div class="input-group">{input}<span class="input-group-btn"><button id="password-toggle" class="btn btn-default" type="button">Show</button></span></div>'])->passwordInput() ?> |
34 | 34 | <?= $form->field($model, 'timezone')->dropDownList(array_combine($timezones, $timezones)); ?> |