/** * Displays the login page */ public function actionIndex() { $this->layout = 'unlogin'; $loginForm = new LoginForm(); if (Yii::app()->request->isPostRequest) { $loginForm->attributes = array('email' => $_POST['email'], 'password' => $_POST['password']); $loginForm->verify = $_POST['verify']; if ($loginForm->authenticateAdmin()) { $this->redirect("/admin/"); } } $this->render('login', array('model' => $loginForm)); }