Open grzech1983 opened 5 years ago
@grzech1983 What do you mean it is not usable? The library method or the API method itself? The library could be easily updated.
Concerning your second point, did you saw any issues when initialIdSite is not passed? And do you have any idea, what it is doing? There is no documentation. :(
This is how our code is implemented.
int[] idSites = { piwikSiteId };
var password = Membership.GeneratePassword(16, 3);
response = usersManager.addUser(piwikUserName, password, piwikUserEmail);
if (!response["result"].Equals("success"))
{
throw new OperationCanceledException($"Unable to create piwik user. Received status: {response["result"]}");
}
response = usersManager.setUserAccess(piwikUserName, UsersManager.UserAccess.view, idSites);
We did not saw any issues, but I confirm it makes sense to update the library.
Hello,
I'm just notifying that from version 3.8.0 of Matomo updating user is not working anymore because of:
https://developer.matomo.org/changelog
and since API is not using any credentials at all only token then IMHO is not usable in current state.
Adding new user using addUser is also needing new param: initialIdSite
- UsersManager.addUser (userLogin, password, email, alias = '', initialIdSite = '') [ No example available ]
Thanks