latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Username on Multisite

Home Forums Community Forum Username on Multisite

This topic contains 1 reply, has 2 voices. Last updated by  Cristián Lávaque 4 years, 5 months ago.

Topic Author Topic
Posted: Sunday Jul 22nd, 2012 at 5:24 pm #19949

Hello,

On WordPress Multisite when users register there are restrictions on usernames, one of which is that they have to be in lowercase. To get around this I use

remove_filter( 'sanitize_user', 'strtolower' );

but with s2member installed that filter doesn’t work. Any idea how I can get around this?

Thank you

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Monday Jul 23rd, 2012 at 7:27 am #19976

Hi Philly.

I searched the s2Member files and [hilite mono]sanitize_user[/hilite] is used in a few files.

If you want to alter the way usernames are sanitized, I think the best way would be to use the filter available for the output of the function. http://codex.wordpress.org/Function_Reference/add_filter

http://wordpress.taragana.net/nav.html?wp-includes/formatting.php.source.html#l276
[hilite pre_code]
return apply_filters('sanitize_user', $username, $raw_username, $strict);
[/hilite]

I hope that helps. :)

Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.