Re: Usernames with spaces do not work
I created a plugin that allows usernames with spaces… not in the most elegant way, but it seems to work for me.
<?php
/*
Plugin Name: HowToGeek Functions
Plugin URI: http://www.howtogeek.com
Description: Cleanup functions for bbPress issues
Author: The Geek
Author URI: http://www.howtogeek.com/
Version: 0.0.1
*/
function htg_resanitize( $text, $raw ) {
return preg_replace(‘/[^ ta-z0-9_-]/i’, ”, str_replace(“%20″,” “,$raw));
}
function htg_repermalinkfix($permalink){
return str_replace(” “,”%20”,$permalink);
}
add_filter(‘bb_repermalink_result’,’htg_repermalinkfix’,1,1);
remove_filter(‘bb_user_sanitize’,’bb_user_sanitize’);
add_filter(‘bb_user_sanitize’,’htg_resanitize’,1,2);
?>