Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Trim username at the login page before attempting to log in #17

Closed
josephthweatt opened this issue Jan 3, 2017 · 4 comments

Comments

@josephthweatt
Copy link
Contributor

josephthweatt commented Jan 3, 2017

Currently logging into Helpq requires you avoid spaces before and after typing in your username. So this input will not work:
username: " admin "
password: "hunter2"

My fork has made changes so that the above input works. Of course, only the username is trimmed, not the password. If you would like to implement this change, I've included the modified code block. This change is made in client/components/login/login.js :

  Meteor.loginWithPassword(
      $(t.findAll('#username')).val().trim(),
      $(t.findAll('#password')).val(),
      function(error){
        if (error){
          $(t.findAll('#password')).val("");
          t.error.set(error.reason);
        }
      }
  )
}
@ehzhang
Copy link
Owner

ehzhang commented Jan 3, 2017

Sounds like a good change! Want to submit a pull request for a formal review / merge? Would be a nice addition to the contributors list!

@josephthweatt
Copy link
Contributor Author

I could do that, but I've also made some stylistic changes to the app itself (colors, logos, etc). Will you be able to pick out the specific changes to merge? Thank you.

@ehzhang
Copy link
Owner

ehzhang commented Jan 3, 2017

If you could, you can create a branch from the point of fork, and cherry pick the commit or part of the commit. Then you could compare that branch!

@josephthweatt
Copy link
Contributor Author

Alright, made the request.

q9f pushed a commit to ethb3rlin/helpq that referenced this issue Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants