예제 #1
0
 public function actionIndex()
 {
     $model = new LoginForm();
     if (isset($_POST['LoginForm'])) {
         $model->attributes = $_POST['LoginForm'];
         $valid = $model->validate();
         if ($valid && $model->authenticate()) {
             $this->inCabinet();
         }
         $this->redirection('/main?error=login', array());
     }
     $this->redirection('/main', array());
 }
예제 #2
0
 /**
  * Authenticates the password.
  * This is the 'authenticate' validator as declared in rules().
  */
 public function authenticate($attribute, $params)
 {
     parent::authenticate($attribute, $params);
 }