There is a function in the user.php
of the core files called wp_authenticate_username_password
that seems like what you’re looking for.
If you want to avoid throwing in the $user
object (you probably only have the username + password), then just throw null
as 1st function argument in:
$check = wp_authenticate_username_password( NULL, 'some_username', '#thepassw0rd' );
You can then simply check the result with is_wp_error( $check )
.
Related Posts:
- WordPress REST API call generates nonce twice on every call
- Add Custom User Capabilities Before or After the Custom User Role has Been Added?
- custom XMLRPC method plus authentication of user & WooCommerce order
- How to check WordPress website username and password is correct
- Log in from one wordpress website to another wordpress website
- WordPress custom authentication implementation
- Custom user profile, registration, login page with theme
- How to use WP default post list tables in a plugin?
- How to add quick edit and bulk edit fields to users admin section
- Generating User(s) with Settings API
- WordPress admin deleted user details not removed in database. How to delete WordPress Users from Database
- How to extend expiry time of jwt wordpress token?
- Configuring WordPress Auth Cookie Expiration
- Print WordPress username id inside JavaScript
- Function Get User Object By Username?
- How to get the ID of the currently logged in user?
- Check if someone is editing a post (this content is currently locked)
- Modify users.php page to create page/post on button clicked
- Subscribe to author?
- How to filter users list on user_status field with get_users()
- Frontend language per user
- Display custom fields in frontside user profile
- global $current_user not current user
- Display list of uploaded images, filtered by user under a specific user group
- What is the proper way to get logged in user id in a plugin?
- How to set a cookie for logged in users to md5($user->ID . “my_secret”)?
- How to build a fool proof AdSense revenue sharing model?
- Hide custom post type by user roles
- How do I have now a duplicated user entry if this is not allowed (and I cannot replicate it)?
- How to allow only two (or more) users access to a plugin
- First and last name fields not filled when using wp_insert_user
- Wp-admin Custom User Management
- get author of published post
- How to get custom post_author?
- Associate multiple email addresses with the same user account, so they can log in with either
- Update a user profile via frontend
- Secruity Questions on a timer
- Best practice for Designing a Plugin with this scenario
- Adding another field to user table
- Redirect returning users to a certain page?
- how to get the top 10 popular blogs
- How can I change my assigned user role in WordPress 3.5.1?
- How to relate the Category to user?
- Adding a dropdown on the user admin
- Allowing duplicating users with same user_login and user_email
- Why User_login key doesn’t work with wp_update_user()
- How to grab data after wp user search is complete
- how to add security questions on wp-registration page and validate it
- How to prevent users from deleting their accounts?
- User Registration Moderate
- How to retrieve custom profile fields associated with different users
- Upgrade routine: Interaction with user confirmation
- Multiple Users Logged In Causing Incorrect Account Returned
- first_name property missing inside register_user action hook
- user can login from single account detail from multiple locations(computer) at the same time [closed]
- Create Unique and Customized User ID for Website Members in WordPress
- Rest Api WordPress
- How to get the number of pages when paginating comments?
- How does “Your comment is awaiting moderation” work?
- why does get_option( ‘home’ ) not work while using in plugin [closed]
- Plugin architecture to pull from API & create dynamic content on WP site?
- Undefined is_user_logged_in() error with Plugin Query code
- Add code to template dynamically
- Thickbox in Plugin settings page?
- Plugin Options not saving options and doesn’t work
- How to localize data array in plugin’s option page
- Plugin admin page stylesheet doesn’t work
- How To Protect Plugin Display From Being Affected By Theme’s CSS
- How to remove/replace current page template?
- WordPress dynamic widget by location?
- wp login redirect loop reauth=1
- How do I add a menu item to a Pods admin menu?
- How to share user data across multiple WordPress websites?
- sanitizing/escaping plugin options
- Bootstrap Error in WordPress plugin
- Update plugin settings option_name for big plugin update
- Load stylesheet in edit category page?
- What could cause a WP Option to get truncated?
- Plugin to create Posts and Forums then choose category and parent forum
- $wpdb->update Issue
- Checking for existing title in custom db query not working
- Borrowing of Previously Translated Strings by Child Plugin
- Enqueue scripts inside a class in a plugin
- Adding filter to the title without affecting the menu title
- Redirect User to custom URL after registering
- Load php file with jquery in single.php
- Listing wordpress users with a search function
- Is there anything special required to make a plugin work in a multisite environment?
- Restrict certain actions to plugin-specific admin menu pages only
- How to validate inputs with filter in register_setting callback
- WordPress Page Reload Takes forever during theme development
- Cannot stop wpautop from messing up my plug-in output
- How to get post meta in functions?
- Enqueue ONLY Plugin Styles and Scripts
- Plugin’s total number of users
- How to edit wp-signup.php content using plugin
- How to Find a Gallery’s ID
- How to close tinymce inline popup
- AJAX request not routing through proxy
- How can I prevent ‘500 internal server error’ because of a long install process?