Reputation: 19
I'm new using yii framework in web development. I'm developing a website with a login page. I autenticate then user in a login page via password and username, then the user is redirected depending on his/her role. Now, I cant figure out how to validate the user in the redirected page ?. Thanks in advance.
Upvotes: 1
Views: 52
Reputation: 913
Check in
Controller folder siteController->actionLogin
function
there is a redirect URL is mentioned in this function actionLogin ()
if(isset($_POST['LoginForm']))
{
$model->attributes=$_POST['LoginForm'];
// validate user input and redirect to the previous page if valid
if($model->validate() && $model->login())
$this->redirect(Yii::app()->user->returnUrl);
}
here you can get the login user's authentication details and also changed the redirect URL
Upvotes: 2