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.
Thanks for your pull request. It looks like this may be your first contribution to the BuddyBoss Platform open source project. Please note that this project and all contributions to it are public and bounded by the GPL v2.0 license, and that a record of the contribution (including all personal information you submit with it, including your full name and email address) is maintained indefinitely and may be redistributed with this project. If you are not okay with these terms, please close this pull request. Alternatively, you can let us know about your concerns by adding a comment to this pull request.