Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RWebUser and its behaviors do not have a method or closure named "updateSession". #59

Open
larry-tx opened this issue Sep 5, 2013 · 1 comment

Comments

@larry-tx
Copy link

larry-tx commented Sep 5, 2013

This is a great module in many ways, but every time I log out and log back in it produces the error message RWebUser and its behaviors do not have a method or closure named "updateSession". If I then hit the browser's back button, it returns me to the Web site, and I'm logged in just fine.

In the stack, this appears to originate in this call:

public function afterSave() {
         if (get_class(Yii::app())=='CWebApplication'&&Profile::$regMode==false) {
             Yii::app()->user->updateSession();
         }
         return parent::afterSave();
     }

found in protected\modules\user\models\User.php.

At this point, I've had to comment out all references to any relationship to the User model because of similar problems with RWebUser. Is there any resolution for this?

@schmunk42
Copy link
Contributor

Assuming you're using rights, you can fix this with: https://github.com/schmunk42/web-user-behavior

This extension provides methods to ensure compatiblity for rights and yii-user.
Yii Behavior, which implments features from WebUser from mishamx/yii-user to avoid errors when using both extensions mentioned above together.

You can attach the behavior to any web-user to provide the methods needed by yii-user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants