Saturday, 15 September 2012

Yii: Login page redirects users to Login Page -



Yii: Login page redirects users to Login Page -

i having issue log in function; keeps redirecting login page after succesfull login page tho specified other wise, function:

public function actionlogin() { $model = new loginform; // if ajax validation request if (isset($_post['ajax']) && $_post['ajax'] === 'login-form') { echo cactiveform::validate($model); yii::app()->end(); } // collect user input info if (isset($_post['loginform'])) { $model->attributes = $_post['loginform']; // validate user input , redirect previous page if valid if ($model->validate() && $model->login()) $this->redirect(array('/news/admin')); } // display login form $this->render('login', array('model' => $model)); }

can help me understnad whats going on? have been going around lastly 6 hours , sure pretty simple!!

yii

No comments:

Post a Comment