WordPress.org

Ready to get started?Download WordPress

Forums

External Database Authentication Reloaded
problem with 'authenticate' filter (3 posts)

  1. schmolluck
    Member
    Posted 8 months ago #

    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/

  2. Joshua Parker
    Member
    Plugin Author

    Posted 8 months ago #

    I am not sure I understand.

  3. schmolluck
    Member
    Posted 8 months ago #

    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);

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.