[Piwik-hackers] [API breaking change on UsersManager.setUserAccess] Re: Two questions about Piwik API
Matthieu Aubry
matthieu.aubry at gmail.com
Thu Jun 26 02:59:23 CEST 2008
> On the other hand, I've realized when you use the
> *UsersManager.setUserAccess (userLogin, access, idSites = '') *call,
> if you don't provide a value for idSites,
> Piwik gives the user the specified acces to ALL sites. Is this
> intentional? I had a mistake in my code, so the variable with the
> idSites was NULL, and all the users I've been
> created have acces to ALL sites that existed at the time they were
> created. It would be nice to have a keyword for this, like
> *idSites=all* (for example), so you don't do this
> accidentally, but maintain the ability to apply to every sites.
I quite agree so I updated the API and code using it. You now have to
pass idSites="all".
*This is an API breaking change*
If you were using this non desirable feature. If you were calling
*UsersManager.setUserAccess *with idSites empty, you should now call it
with idSites = "all"
> I've noticed the API call for *UsersManager.getTokenAuth (userLogin,
> password)* has changed recently.
> Before, the password parameter was *passwordMd5ied*, or something like
> that, but now it goes without encryption. Why this change? (just curious)
>
To allow more flexibility: you can now either pass a password of
passwordMd5ied. The api hasn't broken, and both should work (if the
password length is 32, we assume this is a md5ied version)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.piwik.org/pipermail/piwik-hackers/attachments/20080626/0d70c9f9/attachment.htm
More information about the Piwik-hackers
mailing list