buddyboss-platform
buddyboss-platform copied to clipboard
#1485 - Invalid activation key
If the user_status is already set to 0, $wpdb->query returns 0. Checking the result with boolean false fixes the issue.
All Submissions:
- [x] Have you followed the Pull Requests Guidelines?
- [x] Does your code follow the WordPress' Coding Standards?
- [x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
Changes proposed in this Pull Request:
Fixes #1485 This case is always not reproducible. Sometimes user_status is set to zero before activating the key. Checking wpdb query result strictly helps to fix the false positives.
How to test the changes in this Pull Request:
- Register a new user.
- Change the user status to 0 in usermeta table.
- Try activating the key.
Proof Screenshots or Video
Other information:
- [x] Have you added an explanation of what your changes do and why you'd like us to include them?
- [ ] Have you written new tests for your changes, as applicable?
- [x] Have you successfully run tests with your changes locally?
Changelog entry
Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.