php script that verifies users with wp_authenticate_username_password
-
I have a broken php script that I would like to take the inputted username and password and check that to the users in my wordpress site. If username and password match, echo ‘success’;
<?php
require_once(‘../store.rbxtv.com/wordpress/wp-includes/user.php’);
require_once(‘dbConnect.php’);
if($_SERVER[‘REQUEST_METHOD’]==’POST’){
//Getting values
$username = ”;
$password = ”;
$user = null;
$result = wp_authenticate_username_password($user, $username, $password);
if (is_wp_error($result)) {
echo ‘not authenticated’;
} else {
echo ‘authenticated’;
}
mysqli_close($con);
}Formatted Code: http://pastebin.com/QaKPkyGt
- The topic ‘php script that verifies users with wp_authenticate_username_password’ is closed to new replies.