@RMastop opened this Pull Request on September 21st 2017 Contributor

No need for showing the value of a password field.

Please issue pull request against the 3.x-dev branch only.

Piwik 2 is in LTS mode. This means we do not accept any pull request for 2.x except critical security bugs and major data loss bugs.

If you need to create a pull request for 2.x, then please also create the pull request against the 3.x-dev so we can merge both.

Happy hacking!

@sgiehl commented on September 22nd 2017 Member

Not sure if we should simply change the input type to password. I guess it common approach to have either on password field in clear text, or two fields (with repeat) to prove user didn't make a mistake when typing the password.

@mattab commented on September 22nd 2017 Member

What I see often these days is leaving only one field, by default password protected, but having a checkbox next to it Show password and when clicked, the field becomes visible. this could be a good solution.

refs https://github.com/piwik/piwik/issues/6329

@mattab commented on September 27th 2017 Member

Hi @RMastop would you like to implement a new checkbox next to it Show password that would show the password when clicked?

@mattab commented on September 27th 2017 Member

An even better solution may be to add a little Show link in the field such as what Paypal does here:

@fdellwing commented on October 25th 2017 Contributor

So, I use this toggle thing quite often and here are my thoughts on this:

The function itself is pretty easy, but it is not as easy to get this into piwik to look good because it is inside an table...


<input id="useradd_password" placeholder="password" size="10" type="password">
<a href="#" style="position: absolute;margin: 16px 0 0 -30px;" onclick="toggle_pw">show</a>
function toggle_pw() {
  $(this).html(function(index, text) {
    return text == "show" ? "hide" : "show";
  $(this).prev().attr('type', function(index, attr) {
    return attr == "password" ? "text" : "password";

Because you would need to translate the "show" and "hide" it would be better to use a known symbol like these two:


The JavaScript code would then look like this:

function toggle_pw() {
  $(this).toggleClass("fa-eye fa-eye-slash");
  $(this).prev().attr('type', function(index, attr) {
    return attr == "password" ? "text" : "password";

One last problem in piwik would be, that the input width is pretty small, so if you use a long password, the text would go under the link/symbol.

I hope this helps :)

@sgiehl commented on February 10th 2020 Member

User management has been refactored meanwhile. The value of the password field when adding users isn't shown anymore, so closing this PR

This Pull Request was closed on February 10th 2020
Powered by GitHub Issue Mirror