i started using yii-rights module but i’m having trouble using afterLogin function in RWebUser.
Considering that i followed correctly the yii-rights doc and so all configuration should be ok, on firing actionLogin i get this php error message:
"Using $this when not in object context in path\to\RAuthorizer.php".
The stack trace stop at function: RAuthorizer::isSuperuser( ) location: …\RWebUser.php:21". If i remove afterLogin function (as test) it doesn’t give any problem but, obviously, in this way Superuser is not identified.
Hey Vot , usually this php error message is generated in a static context. Meaning you are using a static funcion , try removing the static from the public function . Let me know if you are having problems. Look in the RAuthorizer.php