Search the Community
Showing results for tags 'username'.
Found 3 results
The username sanitizer (wire('sanitizer')->username("string")) is currently deprecated in favor of the using the pageName sanitizer because users are stored internally as pages. From a code readability standpoint it is more self-documenting to use a "username" sanitizer, not a "pageName" sanitizer. If, for whatever reason, the underlying implementation as pages changes there is no problem when using "username". If, for whatever reason, the allowable character set is different for usernames than page names there is no problem when using "username". The only benefit I can see that comes from removing the username sanitizer is the removal of a very small bit of code. Hence, my suggestion for keeping the username sanitizer and decoupling the API from the implementation.
First of all, its not a big problem. I have created a custom registration form. For the username field I have used the sanatizer api before storing the username in the database. $username is the variable from the form input after submit (Post) I sanatize it like this: In the guidelines there is the following statement: So far so good, but sanatizing the username value changes all big letters [A-Z] to small letters [a-z]. So it doesnt allow big letters in the username. It is not a big deal, but big letters should be allowed according to the statement. Does anyone made the same experience. PS: I use the latest stable version of PW. Addition: it also changes the "@" into "-" .