Authenticated Download


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?


Use the sendfile method,

  if (User has access)


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