This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
lemmy-api-php [2023/06/27 13:32] admin |
lemmy-api-php [2023/06/28 13:55] (current) neil |
||
|---|---|---|---|
| Line 11: | Line 11: | ||
| <code bash> | <code bash> | ||
| for i in 145 156 162; do ./lemmy-api.php purgePerson $i; done | for i in 145 156 162; do ./lemmy-api.php purgePerson $i; done | ||
| + | </code> | ||
| + | and to work through all IDs from 170-240: | ||
| + | <code bash> | ||
| + | for i in `seq 170 240`; do ./lemmy-api.php purgePerson $i; done | ||
| </code> | </code> | ||
| Line 27: | Line 31: | ||
| Here is some example code for a PHP command line tool that will let you purge local users. | Here is some example code for a PHP command line tool that will let you purge local users. | ||
| + | |||
| + | <code php config.php> | ||
| + | <?php | ||
| + | $lemmy_domain = ""; // e.g. lemmy.ml | ||
| + | $username = ""; | ||
| + | $password = ""; | ||
| + | $token_file = ".lemmy-api-token"; // this is where your token is cached, can be any location | ||
| + | ?> | ||
| + | </code> | ||
| <code php lemmy-api.php> | <code php lemmy-api.php> | ||