|Posted: Wednesday May 23rd, 2012 at 12:43 am #14268|
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;
How can I do this using hooks / filters?
In short She wants email as username, and removing username form field in all forms.
- s2Member® Products