I'd like to use Moodle as a training module to help people use the main web service.
I don't want them to have to log in separately to moodle.
Is there a way of
1) creating an account in Moodle for them when they first click on the training link within the application.
2) log them in to their matching Moodle account when they click on the training link within the application.
I'd like it to be as seamless as possible.
I'd initially considered writing a new authentication module to tie into our existing code and user database but there would then still be two login screens, one for the web service and one for Moodle. I'd like the users to just log in to the main web service with the existing authentication and for an auto log in to happen to Moodle when they click the training link.
I'm completely new to Moodle development so any pointers and potential things to be aware of greatly appreciated!
We do this with an auth plugin. We have a single sign-on system which the user logs into. If they go to Moodle once they are logged in, the auth plugin checks that their SSO cookie is valid (by calling back to the SSO system via a web service), creates them an account if they dont have one, and logs them in to Moodle.
We use the before_http_headers callback to run code at the start of each page which lets us check if they're logged in.