Problem Description
I have a portal called xyz.com and a Moodle site called yzx.com. I have some users on both sites, which have same usernames and password. What I want is when a user logs in on non-Moodle site called xyz.com, he should auto login to the same user on yzx.com i.e moodle site.
Please help me how can I make curl or API request to moodle so it auto-logins on the current browser. Moodle has function user_login($username,$pass) but don't know how to use it as I am new to moodle.
AI-Generated Solution
Powered by LMSouq AI · GPT-4.1-mini
Analyzing problem and generating solution…
Was this solution helpful?