Title: incompatible wp_login_failed hook usage
Last modified: August 31, 2016

---

# incompatible wp_login_failed hook usage

 *  [Danny Janse](https://wordpress.org/support/users/vetyst/)
 * (@vetyst)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/incompatible-wp_login_failed-hook-usage/)
 * Hi,
 * I’ve had issues with this plugin because of the usage of wp_login_failed hook.
 *     ```
       function pr_authenticate($error, $user, $pass)
       {
           if (!empty($user)) {
               $error->user_login = $_POST['log'];
           }
   
           if (is_wp_error($error)) {
               //do_action('wp_login_failed', $error); // Your way
               do_action('wp_login_failed', $error->user_login); // Supposed way
           }
   
           return $error;
       }
       ```
   
 * This usage provides issues with many other plugins.
    As have your own hook in
   wp_login_failed aswell, I suggest you the change the hook name to pr_login_failed
   instead and call both of the seprately.
 * [https://wordpress.org/plugins/pagerestrict/](https://wordpress.org/plugins/pagerestrict/)

The topic ‘incompatible wp_login_failed hook usage’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/pagerestrict.svg)
 * [Page Restrict](https://wordpress.org/plugins/pagerestrict/)
 * [Support Threads](https://wordpress.org/support/plugin/pagerestrict/)
 * [Active Topics](https://wordpress.org/support/plugin/pagerestrict/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pagerestrict/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pagerestrict/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Danny Janse](https://wordpress.org/support/users/vetyst/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/incompatible-wp_login_failed-hook-usage/)
 * Status: not resolved