build/commands/lite/protected/controllers/SiteController.php
public function actionLogin()
	{
		$user=new LoginForm;
		if(Yii::app()->request->isPostRequest)
		{
			// collect user input data
			if(isset($_POST['LoginForm']))
				$user->setAttributes($_POST['LoginForm']);
			// validate user input and redirect to previous page if valid
			if($user->validate())
				$this->redirect(Yii::app()->user->returnUrl);
		}
		// display the login form
		$this->render('login',array('user'=>$user));
	}
public function actionLogin()
	{
		$user=new LoginForm;
		if(Yii::app()->request->isPostRequest)
		{
			// collect user input data
			if(isset($_POST['LoginForm']))
				$user->setAttributes($_POST['LoginForm']);
			// validate user input and redirect to previous page if valid
			if($user->validate())
				$this->redirect(Yii::app()->user->returnUrl);
		}
		// display the login form
		$this->render('login',array('user'=>$user));
	}
public function actionLogin ( ) { $ user = new LoginForm ; if ( Yii :: app ( ) -> request -> isPostRequest ) { // collect user input data if ( isset ( $ _POST [ 'LoginForm' ] ) ) $ user -> setAttributes ( $ _POST [ 'LoginForm' ] ) ; // validate user input and redirect to previous page if valid if ( $ user -> validate ( ) ) $ this -> redirect ( Yii :: app ( ) -> user -> returnUrl ) ; } // display the login form $ this -> render ( 'login' , array ( 'user' => $ user ) ) ; }
Displays a login form to login a user.
Displays a login form to login a user .