Processing POST data from external login website


I am working on an application where user needs to authenticate on external website.

in site/login controller I could setup redirect to that page if user is not logged in. Authentication website return POST data.

How can I process that POST data in site/login controller?

Yii::app->redirect() doesn’t return anything.

I am using yii 1.1


Thanks for your reply. That’s exactly I was looking for.

What U can use is Yii::app()->request->getPost(‘name’) or Yii::app()->request->getParam(‘name’)

please check this :



1 Like

The website where your user will be redirected if he/she is not logged in, will probably send POST request back to the site/login action upon sucessful/bad authentication action. So inside site/login action you can write something like this:

Yii::app()->request->getPost('email');//This is equal to $_POST['email']

Yii::app()->request->getPost('status');//This is equal to $_POST['status']

So you are retreaving email and status from the POST array. You have to know what data will be sent from the third party website, in order to retreave it.