Login Fails (Multisite)

Hi,

I have multiple websites setup on Piwik, each website has users attached to them with ‘view’ access.

For eg. foo.com with idsite 2 has a user X with view access to it.

If I try to login with the correct username and password, i get an error which says:

“Error: You can’t access this resource as it requires an ‘view’ access for the website id = 1”

It happens with every site. After login, the page always redirects to /stats/index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday

After that if I manually change the idSite to 2, /stats/index.php?module=CoreHome&action=index&idSite=2&period=day&date=yesterday it loads the dashboard correctly.

Why does it redirect to idSite=1 by default?

Figured out the goof up.The user had set his default view to be site 1. The superadmin later revoked the users ‘view’ access to site 1.

So the index page was redirecting to site 1 and was throwing the error.