WordPress.org

Ready to get started?Download WordPress

Forums

using authenticate filter and returning a WP_Error (1 post)

  1. kevbrad
    Member
    Posted 4 years ago #

    I'm developing a plugin that uses the authenticate filter to intercept a login. After going through my logic I want to return an error to the logn screen and halt the login process. In side my function I have...

    function myAuth($user = NULL, $username = '', $password = '')
    {
      //.. after my login I want to return an error
      return new WP_Error('invalid_username', __('my message'));
    }

    The problem is that my message does not get returned - I just get the standard message for an invalid username. How do I correct this?

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 4 years ago by kevbrad
  • This topic is not a support question
  • WordPress version: 2.9.1