-
-
Save parzibyte/0cdf8c7f06d82e0647c4fa936f25fe84 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function obtenerUsuarioDeWordPress($usuarioOCorreo) | |
{ | |
$bd = obtenerBaseDeDatosWordPress(); | |
$sentencia = $bd->prepare("SELECT * FROM wp_users | |
INNER JOIN wp_usermeta ON wp_users.ID = wp_usermeta.user_id | |
WHERE (wp_users.user_login = ? OR wp_users.user_email = ?) AND wp_usermeta.meta_key = ?"); | |
$sentencia->execute([$usuarioOCorreo, $usuarioOCorreo, "wp_capabilities"]); | |
return $sentencia->fetchObject(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment