Here I attempt to get a user by email, passing it an email stored in the student
variable.
$user = get_user_by("email", $student);
Student variable
echo $student;
>>> xxxx.xxxxx@xxxxxx.co.uk
I can confirm this email is correct and exists as a users email.
var_dump($user);
>>> (false)
I’m currently editing within a pdf_certificates generator plugin.
Is there any reason I shouldn’t be able to access this user? Cheers guys.
Try this
get_user_by(“user_email”, $email)