<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>bbPress support forums Topic: underscore stripped from username?</title>
<link>http://bbpress.org/forums/</link>
<description>bbPress support forums Topic: underscore stripped from username?</description>
<language>en</language>
<pubDate>Tue, 02 Dec 2008 12:48:28 +0000</pubDate>

<item>
<title>lonemadmax on "underscore stripped from username?"</title>
<link>http://bbpress.org/forums/topic/underscore-stripped-from-username#post-4855</link>
<pubDate>Sun, 25 Feb 2007 00:37:59 +0000</pubDate>
<dc:creator>lonemadmax</dc:creator>
<guid isPermaLink="false">4855@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;At the end of the plugin you can see:&#60;br /&#62;
&#60;code&#62;add_filter(&#38;#39;user_sanitize&#38;#39;, &#38;#39;user_sanitize_i18n_fix&#38;#39;, 10, 3);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;That adds the function defined in the plugin to the &#60;code&#62;user_sanitize&#60;/code&#62; hook.  Grepping the core files for &#60;code&#62;user_sanitize&#60;/code&#62;, you find &#60;code&#62;return apply_filters( 'user_sanitize'&#60;/code&#62;[...] in &#60;code&#62;bb-includes/formatting-functions.php&#60;/code&#62;, in the function &#60;code&#62;user_sanitize&#60;/code&#62;.  When that function is called with strict = true, it removes what it considers not to be a letter, a number or a '-' from the first parameter (the provided username), and replaces repetitions of '-' with just one.  So the underscore is removed.  When strict is false, underscores are kept.  Another effect is that accented characters and other such niceties of international scripts are also invalidated.&#60;/p&#62;
&#60;p&#62;After doing that, it runs the filters, telling them its result, the original value and the value of strict.  If installed, &#60;code&#62;usernames-i18n-fix&#60;/code&#62; will be one of those filters.  It returns the original username value (that is, with whatever characters were there from the beginning) if not in strict mode.  If strict is true, it just replaces repetitions of '-' with only one '-'.&#60;/p&#62;
&#60;p&#62;So that's how I read it.  But I don't know if the names really need the sanitazion.
&#60;/p&#62;</description>
</item>
<item>
<title>macwise on "underscore stripped from username?"</title>
<link>http://bbpress.org/forums/topic/underscore-stripped-from-username#post-4850</link>
<pubDate>Sat, 24 Feb 2007 23:11:56 +0000</pubDate>
<dc:creator>macwise</dc:creator>
<guid isPermaLink="false">4850@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Lonemadmax...&#60;/p&#62;
&#60;p&#62;This seemed to do the trick.  I looked at the plugin, and I can't understand any of that crap.  It's only a few lines of code in the plugin, but it seemed to work.  As long as there isn't a reason why I SHOULDN'T just let it run as it was designed to do, then I'll leave it the way it is.  &#60;/p&#62;
&#60;p&#62;Thanks for your suggestion!
&#60;/p&#62;</description>
</item>
<item>
<title>lonemadmax on "underscore stripped from username?"</title>
<link>http://bbpress.org/forums/topic/underscore-stripped-from-username#post-4843</link>
<pubDate>Sat, 24 Feb 2007 19:53:37 +0000</pubDate>
<dc:creator>lonemadmax</dc:creator>
<guid isPermaLink="false">4843@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Maybe look for the usernames-i18n-fix plugin.  It allows much more that underscores, but reading it and the place it hooks to, you may be able to craft something to your liking.
&#60;/p&#62;</description>
</item>
<item>
<title>macwise on "underscore stripped from username?"</title>
<link>http://bbpress.org/forums/topic/underscore-stripped-from-username#post-4787</link>
<pubDate>Fri, 23 Feb 2007 06:34:35 +0000</pubDate>
<dc:creator>macwise</dc:creator>
<guid isPermaLink="false">4787@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;I have a user that had the underscores stripped from his username when he registered.  Is there any way to curb this unhappy behavior?
&#60;/p&#62;</description>
</item>

</channel>
</rss>
