I am trying to write a bookmarklet like Instapaper or Pocket(Read it later) uses in order to transfer data of the current page to my app.
When I click on the bookmarklet I insert this Javascript Snippet in to the header of the current site (could be any website):
<script src="http://mysite.com/index.php?r=entries/submits&u=http%3A%2F%2Fwww.google.com%2F&t=Google">
With this snippet i am able to connect to my controller which will return Javascript code:
public function actionSubmits()
{
if(Yii::app()->user->isGuest){
echo 'alert("not logged in");';
return;
}
...
}
Now the Problem is, although I am logged in as a user I always get alerted that i am not logged in which means that Yii::app()->user->isGuest returns true although I am logged in. Why is that so?
Any help would be greatly appreciated.

Help











