Version 4.11.0 changed the way users are created: You can’t set their password as Admin anymore, instead there is an invite email sent to new users. So far so good, i understand why this has changed.
However, my matomo isn’t sending invite emails. Or at least they don’t arrive. I know, there are many things that can cause this, so i am trying to narrow it.
I tried with local mail() and with gmail server: no errors, no mails.
has anybody found a solution to still create new users incl. passwords as an admin? the API should work, but i couldn’t make it work. Maybe someone has a code example for this using UsersManager.addUser?
any idea what’s wrong with mail setup? i used settings from google help (smtp.gmail.com, TLS, port 587)
If you wanted to test your mail server, you can use the included console command for testing emails, for example:
./console core:test-email emailHere@example.com
As a workaround for now you can use the API method to create new users. Since there isn’t an example, I wrote one that can be used below.
If you wanted to simply use your browser, then you can do a simple GET request by replacing the values below with the ones you want to set for your user. It’s important to remember that the email and password both need to be URL Encoded.