Monthly Archives: March 2022
Configurar LDAP y WordPress
Para que puedas auatentificar con WordPress y LDAP se agrega la función en la ruta:
/*
*Autentificación de con LDAP segun usuario
*/
add_action(‘wp_authenticate’, ‘custom_authentication’, 30, 2);
function custom_authentication($username, $password) {
$username = str_replace(“@misitio.com”, “”, $username);
if(trim($password)==”){
$password_wp=’nohay’;
}else{
$password_wp=’MICLAVECORRECTA’;
}
global $user;