Home »
FUDforum »
How To »
How to remove users (make a process to remove users except admin)
How to remove users [message #167994] |
Wed, 05 December 2012 01:01 |
|
peterz
Messages: 8 Registered: March 2011 Location: melbourne
Karma:
|
Junior Member |
|
|
I want to remove all old users except admin, can I just remove users from one table named fud30_users?
sql like : delete from fud30_users where login !='admin'
tried to run below script:
#!/usr/bin/php
<?php
require_once 'GLOBALS.php';
require_once './scripts/fudapi.inc.php';
$u = _fud_simple_fetch_query(0, "SELECT * FROM {$GLOBALS['DBHOST_TBL_PREFIX']}u
sers WHERE login = 'me'");
if (!empty($u->id)) fud_delete_user($u->id);
?>
got error message:
Status: 500 Internal Server Error
X-Powered-By: PHP/5.3.9
Content-type: text/html
can you help?
Thanks,
Peter
[Updated on: Thu, 06 December 2012 03:32] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Nov 22 17:46:45 GMT 2024
Total time taken to generate the page: 0.04169 seconds