Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong login turns into a PHP Error #33

Open
enricodeleo opened this issue Apr 11, 2016 · 0 comments
Open

Wrong login turns into a PHP Error #33

enricodeleo opened this issue Apr 11, 2016 · 0 comments

Comments

@enricodeleo
Copy link

This is related to #27

Using wrong credentials, Wordpress automatically calls a function that generates the lost password login. Since this plugin hook an event that occurs early, the method that produces permalinks is not already available and generates an error.

Hooking the plugin after that moment make the login feature unavailable. It seems that hacking the plugin adding

$GLOBALS['wp_rewrite'] = new WP_Rewrite();

avoid this error but generates another one

Undefined property: WP_Error::$ID in /srv/www/test.com/current/wp/wp-includes/class-wp-user.php on line 165

It's a e_notice so think it could be ignored, but I am wondering if there is any way of make basic auth 100% working without errors at all. Any ideas?

BrianHenryIE added a commit to BrianHenryIE/Basic-Auth that referenced this issue Aug 9, 2017
Sometimes, with an incorrect username and password (or using email address rather than username, which made `wp_authenticate_username_password` error) when `$user = wp_authenticate( $username, $password );` errored, it would call `$wp_rewrite->get_page_permastruct();` before `$wp_rewrite` was initialized, returning a 500 server error. In my case, this would happen when I enabled the SkyVerge WooCommerce Print Invoices/Packing Lists plugin.
BrianHenryIE added a commit to BrianHenryIE/Basic-Auth that referenced this issue Aug 9, 2017
martin-rueegg added a commit to metaworx/Basic-Auth that referenced this issue Apr 14, 2020
Merge pull request #2 from BrianHenryIE/wp_authenticate-bugfix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant