Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

UserManager.getUsersSitesFromAccess() doesn't order idsite #2151

Closed
JulienMoumne opened this Issue · 3 comments

3 participants

Julien Moumné Anthon Pang Matthieu Aubry
Julien Moumné
Collaborator

In my box test_setUserAccess_multipleCallDistinctAccessMultipleUser() fails because

$access1 = array( 'user1' => array(1,2), 'user2' => array(2,3) );
$wanted1 = array( 'user1' => array(1,2), 'user2' => array(3,2) );

This happens because getUsersSitesFromAccess() doesn't order column idsite.

Should we :

  • order idsite

  • sort the array before comparison

Anthon Pang
Collaborator

Interesting. Presumably, we can't expect login to be sorted either. I would add an "ORDER BY login,idsite" clause to the SQL.

Matthieu Aubry
Owner

sounds good

Julien Moumné
Collaborator

(In [4039]) fixes #2151 - ordering getUsersSitesFromAccess() SQL query, updating unit tests, should all API queries have an order by clause ?

Julien Moumné JulienMoumne added this to the Piwik 1.2.1 milestone
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.