Databases: insert query

Databases: insert query

د Shail Jai لخوا -
د ځوابونو شمیر: 1
Hello Team,

where is the insert query for insert into mdl_user

د درجې بندۍ اوسط:  -
In reply to Shail Jai

Re: Databases: insert query

د Tim Hunt لخوا -
د Core developers انځور د Documentation writers انځور د Particularly helpful Moodlers انځور د Peer reviewers انځور د Plugin developers انځور
In Moodle, database access goes through the lib/dmllib.php library, so in this case you need to look for calls to the insert_record function, with 'user' as the first parameter.

The other way to find the answer to your question is to start from the other end. When you create a user using the Moodle UI, the URL is user/editadvanced.php, so have a look at that script, and the library functions it calls.