Hello, hoping to get some assistance on using send_confirmation_email($user) to send a new user a confirmation email.
I am able to create users with the $userid = user_create_user($user); function from /user/lib.php with a confirmed value of 0 then trying to use the following code to send the newly created user a confirmation email:
require_once('../lib/moodlelib.php');
$emailsent = send_confirmation_email($user);
But no email is sent and $emailsent value is null
Any help would be very much appreciated, thanks
Roger