Quantcast
Viewing all articles
Browse latest Browse all 13974

Custom auth implementation, user authenticated, piwik still returns anonymous

@miira wrote:

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

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 13974

Trending Articles