Hello,
I tried to implement Auth interface, everything looks fine, authenticate() is authenticating my users, but after this, the processing goes to core/Plugin/Controller.php - redirectToIndex method and there is a line:
if (!Piwik::isUserIsAnonymous()) {
it is always evaluated as ‘false’, because inside the method
$currentUserLogin = Piwik::getCurrentUserLogin(); is evaluated as 'anonymous'.
This is the implementation of getCurrentUserLogin, but it is unclear to me, what to do, so $login would be set to my logged in user.
public static function getCurrentUserLogin()
{
$login = Access::getInstance()->getLogin();
if (empty($login)) {
return 'anonymous';
}
return $login;
}
What should be called and where?
Could you please help me?
thank you in advance