Create account and pass authentication details to moodle

Re: Create account and pass authentication details to moodle

av toby saunders -
Antall svar: 0

To log someone into moodle I used

authenticate_user_login($user->username, $plain_password);
complete_user_login($user);

I did this in my auth plugin in the user_signup function and it worked to log the user in at the same time as signing them up. You will probably want to redirect them somewhere useful afterwards.

Hope this helps