URGENT: AJAX call issue

Hi,

I’m sorry that I keep posting the same issue. Everyday, I’m on step closer. Finally, I have found the exact problem and I hope someone can really help me.

Here’s the scenario:

I’m trying to go an AJAX call to a ProductController with actionUploaded()

I tried for two nights and cant seem to find an issue till today. The main problem is the Uploaded action got redirect to login page because the AJAX call is considered unauthenticated.

If I change the rule for action uploaded to "*", means anyone can access the action, it will work perfectly fine.

I did send PHPSESSID during the AJAX call and run this at the start of the actionUpload():

Yii::app()->session->sessionID = $_POST[‘PHPSESSID’];

Yii::app()->session->init();

It just didnt work and it redirect. to login page.

Is there any ways I can keep it logged in while doing an AJAX POST call?

Cheers,

Mickey

Any idea? What keeps the AJAX call authenticated?

If flash does not pass the session as stated in the documentation,

http://www.yiiframework.com/extension/euploadify/#doc

It means that the action must be open to anonymous, etc, AccessRule to actionUploaded must be *. How can we check back in the action?


	public function actionUploaded()

	{

	    // flash does NOT pass the session

	    // thus we pass the id with a $_POST variable

	    Yii::app()->session->sessionID = $_POST['PHPSESSID'];

	    Yii::app()->session->init();

            ....

            // WHAT CAN I DO HERE TO CHECK WHETHER IT IS AUTHENTICATED?

        }