Authenticated Download

Hi,

I want to let the client download a zip file which i just created.

But i want the download to be available to the authenticated user only

when i place it in the protected folder i cannot download it.

Any ideas?

thnx

Use the sendfile method, http://www.yiiframework.com/doc/api/1.1/CHttpRequest#sendFile-detail




  if (User has access)

  {

    Yii::app()->request->sendFile('name.txt', 'content here');

  }