Overriding WordPress Authentication Method
-
Hello everybody,
I want to override wordpress authentication method. The authentication will be done with a different function that query username and password using php curl function. For example the code is below;function authenticate($username,$password,$emaildomain){ $find_me = "logintext"; $urltopost = "https://www.xxxx.xxx/auth.php"; $datatopost = array ( "username" => $username, "emailHost" => $emaildomain, "password" => $password, ); $ch = curl_init ($urltopost); curl_setopt ($ch, CURLOPT_POST, true); curl_setopt ($ch, CURLOPT_POSTFIELDS, $datatopost); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true); $returndata = curl_exec ($ch); $pos = strpos($returndata, $findme); if ($pos === false) { // Can not authenticate return false; } else { // Authenticaion is successfull return true; } }
So please can you help me how to do this modification on my wordpress ? Thanx everybody
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Overriding WordPress Authentication Method’ is closed to new replies.