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. 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 $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.
|