Title: problem with &#039;authenticate&#039; filter
Last modified: August 21, 2016

---

# problem with 'authenticate' filter

 *  [schmolluck](https://wordpress.org/support/users/schmolluck/)
 * (@schmolluck)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/problem-with-authenticate-filter/)
 * Hi,
 * Before the login, I have to perform a check of the username. I try it with the
   authenticate filter. But if the plugin is enable, the parameter $username is 
   null.
 * How can I intercept the the authentication to check the username?
 * [http://wordpress.org/plugins/external-db-auth-reloaded/](http://wordpress.org/plugins/external-db-auth-reloaded/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Joshua Parker](https://wordpress.org/support/users/parkerj/)
 * (@parkerj)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/problem-with-authenticate-filter/#post-4306681)
 * I am not sure I understand.
 *  Thread Starter [schmolluck](https://wordpress.org/support/users/schmolluck/)
 * (@schmolluck)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/problem-with-authenticate-filter/#post-4306736)
 * My goal was to add a filter as following:
 *     ```
       add_filter( 'authenticate', 'myplugin_auth_signon', 30, 3 );
       function myplugin_auth_signon( $user, $username, $password ) {
            return $user;
       }
       ```
   
 * In this case the parameter $username is always null. I analyzed the code of plugin‘
   external-db-auth-reloaded’ and I see that the parameter is set to null.
 * I solved the problem. with ‘wp_authenticate_user’. In this cas I have the username.
 * `add_filter( 'wp_authenticate_user', 'checkCodeFilter', 10, 2);`

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘problem with 'authenticate' filter’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/external-db-auth-reloaded.svg)
 * [External Database Authentication Reloaded](https://wordpress.org/plugins/external-db-auth-reloaded/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/external-db-auth-reloaded/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/external-db-auth-reloaded/)
 * [Active Topics](https://wordpress.org/support/plugin/external-db-auth-reloaded/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/external-db-auth-reloaded/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/external-db-auth-reloaded/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [schmolluck](https://wordpress.org/support/users/schmolluck/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/problem-with-authenticate-filter/#post-4306736)
 * Status: not resolved