Jump to content

Suggestion - don't deprecate username sanitizer


Recommended Posts

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.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...