Last active
May 1, 2018 12:03
-
-
Save luukverhoeven/e19959dd18a6d5e10db28016d7efab0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# handy Moodle snippets | |
# Config catch all mails. | |
$CFG->divertallemailsto = 'debug@ldesign.nl'; | |
# Force debugging. | |
@ini_set('display_errors', '1'); | |
$CFG->debug = 32767; | |
$CFG->debugdisplay = true; | |
$CFG->debugusers = '2'; | |
# Query - remove user details. | |
UPDATE `mdl_user` SET | |
`username` = CONCAT( FLOOR( RAND( ) * 90000000 ) , FLOOR( RAND( ) * 90000000 ) ) , | |
`email` = CONCAT( FLOOR( RAND( ) * 90000000 ) , '@mijnapp.nl' ) , | |
`firstname` = CONCAT( FLOOR( RAND( ) * 90000000 ) , '-firstname' ), | |
`lastname` = CONCAT( FLOOR( RAND( ) * 90000000 ) , '-lastname' ), | |
`password` = "fa820cc1ad39a4e99283e9fa555035ec" , | |
`address` = "", | |
`idnumber` = CONCAT( FLOOR( RAND( ) * 90000000 ) , 'id' ) , | |
`city` = "", | |
`lastip` = "", | |
`phone1` = "", | |
`phone2` = "", | |
`institution` = "", | |
`department` = "" | |
WHERE id > 2 | |
# fa820cc1ad39a4e99283e9fa555035ec = test001 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment