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.

S2member Pro Authnet Checkout

Home Forums Community Forum S2member Pro Authnet Checkout

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

Topic Author Topic
Posted: Wednesday May 23rd, 2012 at 12:43 am #14268

Hi,

My client wants auto generated username by using the string before “@xxxmail.com”. I am able to do this using wordpress functions. However, for the checkoutform of s2member I do not know how to filter it properly.

I have eyed upon this available filter.
ws_plugin__s2member_pro_authnet_checkout_post_attr

I would like to filter a $post_vars .

$post_vars[“username”] = preg_replace(“/\s+/”, “”, sanitize_user($post_vars[“username”], is_multisite()));

I would like to turn in into
$guname = explode(‘@’,$post_vars[“email”]);

$post_vars[“username”] = $guname[0];

How can I do this using hooks / filters?

In short She wants email as username, and removing username form field in all forms.

Please help.

Best Regards,

Randy A.

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Wednesday May 23rd, 2012 at 1:36 am #14274

Hi,

I found the solution via javascript. However, I would prefer using php. Hope this becomes available soon.

http://www.s2member.com/forums/topic/make-username-field-optional-and-hide-it/

Posted: Wednesday May 23rd, 2012 at 3:16 am #14291

Hi Randy.

Thanks for the suggestion. I’m adding it to the feature requests list that we keep. :)

Posted: Wednesday May 23rd, 2012 at 8:29 pm #14370

Thanks a lot!

Posted: Thursday May 24th, 2012 at 7:04 am #14460

You’re welcome. :)

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