Title: register user filter
Last modified: June 28, 2017

---

# register user filter

 *  Resolved [datto510](https://wordpress.org/support/users/datto510/)
 * (@datto510)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/register-user-filter/)
 * Hi,
 * I use the following filter to create a new user from emails received.
    Users 
   dont seem to register for the last few emails, has there been any changes with
   the postie plugin that might affect this ?
 * Thanks.
 *     ```
       <?php
   
       add_filter('postie_filter_email', 'my_filterEmail');
   
       function my_filterEmail($email) {
           //create the user
           $user = get_user_by('email', $email);
           if (empty($user)) {
               $user_name = strstr($email, '@', true);
               $userid = register_new_user($user_name, $email);
           }
   
           return $email;
       }
   
       ?>
       ```
   

Viewing 1 replies (of 1 total)

 *  Thread Starter [datto510](https://wordpress.org/support/users/datto510/)
 * (@datto510)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/register-user-filter/#post-9268109)
 * ok well its just worked, so maybe there was some other issue at play 🙂

Viewing 1 replies (of 1 total)

The topic ‘register user filter’ is closed to new replies.

 * ![](https://ps.w.org/postie/assets/icon-256x256.png?rev=970083)
 * [Postie](https://wordpress.org/plugins/postie/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/postie/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/postie/)
 * [Active Topics](https://wordpress.org/support/plugin/postie/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/postie/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/postie/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [datto510](https://wordpress.org/support/users/datto510/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/register-user-filter/#post-9268109)
 * Status: resolved