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.

email address as username?

Home Forums Community Forum email address as username?

This topic contains 10 replies, has 5 voices. Last updated by  Michaela 4 years, 3 months ago.

Topic Author Topic
Posted: Wednesday Sep 12th, 2012 at 2:59 pm #25062

In the last couple of days we’ve had users create their accounts making their email address their user name. How can we prevent this/ turn off this capability?

List Of Topic Replies

Viewing 10 replies - 1 through 10 (of 10 total)
Author Replies
Author Replies
Posted: Wednesday Sep 12th, 2012 at 3:09 pm #25063
cassel
Username: cassel

Do you have a particular reason to not want email address as username? I have seen sites where that is automatically my username. Just curious (i would not have an answer to your question either)

Posted: Wednesday Sep 12th, 2012 at 3:23 pm #25068

Users may be using their work emails or want /need to change it which is not possible of course :-)

Posted: Wednesday Sep 12th, 2012 at 3:25 pm #25069
cassel
Username: cassel

Ah…makes sense. Thanks. I would not have thought of it.

Posted: Thursday Sep 13th, 2012 at 6:51 am #25153

Hi Michaela.

I don’t think an email address would be a valid WP username because of the @. I just tried it and got this error “Only lowercase letters (a-z) and numbers are allowed.”

Posted: Thursday Sep 13th, 2012 at 7:43 am #25156
cassel
Username: cassel

Cristian, with my plugin s2M+MC, it will use the email address as a username if the member registers through the MC registration form instead of the WP form. And it is working. I wonder if that limitation of only alphanumerical characters is not only for going from WP?

Posted: Thursday Sep 13th, 2012 at 9:25 am #25167

to be clear, we’re using s2m for user registrations. I would like to DIS-allow users being able to use their email address as their user name… is this possible with s2m?

Posted: Thursday Sep 13th, 2012 at 10:38 pm #25232
Raam Dev
Username: Raam
Staff Member

Michaela,

No, that is not possible. s2Member is a WordPress plugin and WordPress requires that all accounts have a unique email address.

Posted: Friday Sep 14th, 2012 at 9:05 am #25295

let me put it this way… using s2 is it possible to not allow special characters such as @ in a username… i.e. only letters and numbers…

Posted: Friday Sep 14th, 2012 at 10:20 am #25301

Hi Michaela,

If you use s2members pro forms for registration then yes they will not allow special characters.

If your using wordpress’s registration (wp-login.php?action=register), which I presume you are, then there is no easy way to disallow special characters, you may be able to find a plugin that does it, or you”ll need to do some custom coding.

If you get someone to do some custom coding there is a built in wordpress feature that sanitizes usernames that you should be able to hook into so that would be the place to start

<?php sanitize_user( $username, $strict ) ?>
Posted: Friday Sep 14th, 2012 at 10:51 am #25308

Thank you!

Viewing 10 replies - 1 through 10 (of 10 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.