diff --git a/config/web.php b/config/web.php index 5dff3da..21580b4 100644 --- a/config/web.php +++ b/config/web.php @@ -13,7 +13,6 @@ $config = [ ], 'components' => [ 'request' => [ - // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation 'cookieValidationKey' => 'wyfZNsArEJYqB8EzG5Ag7kphYr_KDZqb', ], 'cache' => [ diff --git a/models/ContactForm.php b/models/ContactForm.php deleted file mode 100644 index f001d21..0000000 --- a/models/ContactForm.php +++ /dev/null @@ -1,65 +0,0 @@ - 'Verification Code', - ]; - } - - /** - * Sends an email to the specified email address using the information collected by this model. - * @param string $email the target email address - * @return bool whether the model passes validation - */ - public function contact($email) - { - if ($this->validate()) { - Yii::$app->mailer->compose() - ->setTo($email) - ->setFrom([Yii::$app->params['senderEmail'] => Yii::$app->params['senderName']]) - ->setReplyTo([$this->email => $this->name]) - ->setSubject($this->subject) - ->setTextBody($this->body) - ->send(); - - return true; - } - return false; - } -} diff --git a/models/LoginForm.php b/models/LoginForm.php deleted file mode 100644 index dce15cc..0000000 --- a/models/LoginForm.php +++ /dev/null @@ -1,81 +0,0 @@ -hasErrors()) { - $user = $this->getUser(); - - if (!$user || !$user->validatePassword($this->password)) { - $this->addError($attribute, 'Incorrect username or password.'); - } - } - } - - /** - * Logs in a user using the provided username and password. - * @return bool whether the user is logged in successfully - */ - public function login() - { - if ($this->validate()) { - return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600*24*30 : 0); - } - return false; - } - - /** - * Finds user by [[username]] - * - * @return User|null - */ - public function getUser() - { - if ($this->_user === false) { - $this->_user = User::findByUsername($this->username); - } - - return $this->_user; - } -} diff --git a/views/layouts/main.php b/views/layouts/main.php index c204435..a215667 100644 --- a/views/layouts/main.php +++ b/views/layouts/main.php @@ -23,58 +23,27 @@ $this->registerLinkTag(['rel' => 'icon', 'type' => 'image/x-icon', 'href' => Yii
-- This is the About page. You may modify the following file to customize its content: -
- -= __FILE__ ?>
-
- Note that if you turn on the Yii debugger, you should be able
- to view the mail message on the mail panel of the debugger.
- mailer->useFileTransport): ?>
- Because the application is in development mode, the email is not sent but saved as
- a file under = Yii::getAlias(Yii::$app->mailer->fileTransportPath) ?>.
- Please configure the useFileTransport property of the mail
- application component to be false to enable email sending.
-
-
- If you have business inquiries or other questions, please fill out the following form to contact us. - Thank you. -
- -Please fill out the following fields to login:
- -app\models\User::$users.
-