Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

sanitize_user()

3 tags 1 category

sanitize_user() — Sanitizes a username, stripping out unsafe characters. Removes tags, percent-encoded characters, HTML entities, and if strict is enabled, will only keep alphanumeric, _, space, ., -, @. After sanitizing, it passes the username, raw username (the username in the parameter), and the value of $strict as parameters for the ‘sanitize_user’ filter.

Inputs: $username (string): The username to be sanitized. $strict (bool): Optional. If set to true, limits $username to specific characters. Default false.

Returns string: The sanitized username, after passing through filters.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…