20 if (isset($_POST[
'UserLogin'])) {
27 if ($model->validate()) {
30 if (Yii::app()->user->returnUrl ==
'/index.php') {
31 $this->redirect(Yii::app()->controller->module->returnUrl);
33 $this->redirect(Yii::app()->user->returnUrl);
38 $this->render(
'/user/login', array(
'model' => $model));
40 $this->redirect(Yii::app()->controller->module->returnUrl);
46 $lastVisit =
User::model()->notsafe()->findByPk(Yii::app()->user->id);
47 $lastVisit->lastvisit = time();