Using send_confirmation_email($user)

Re: Using send_confirmation_email($user)

by Anne Krijger -
Number of replies: 0

Hi Roger,

How do you get from the $userid returned by the user_create_user() to the $user object you use as parameter for send_confirmation_email()?

If you look at the send_confirmation_email function you'll see it ends up calling the email_to_user() function.

If you step through that code you can see all the checks that are done before an email is send out.

Is there an email server (smtp host) defined in the site settings btw?

 

Also: using a debugger to step through the Moodle code will help you a lot in understanding hoe Moodle works.

You also may want to enable debug level error reporting (see site admin - development) if it's not a production site.

Anne.