many thanks to everyone On Thu, Mar 12, 2009 at 9:07 PM, Brett Evanson <brettev@gmail.com> wrote:
if you want to delete the content first, modify code like this:
$drupal_sql = 'select users.uid from {users} left join {users_roles} on users.uid = users_roles.uid where rid=4 '; // where 4 is your role $r = db_query($drupal_sql); while ($row = db_fetch_array($r)) { $usersnodes = db_query("SELECT nid FROM {node} WHERE uid=%d", $row->uid); while($usernode = db_fetch_object($usersnodes)){ node_delete($usernode->nid); } user_delete($row->uid); }
Sumthin' like that. -- [ Drupal support list | http://lists.drupal.org/ ]
pretty rough, but i think it'll work
-- Brett Evanson brettev@gmail.com
-- -- -- Steve Power Principal Consultant Mobile: +44 (0) 7747 027 243 Initsix Technology and Media -- "So Linux is bulletproof? No. Bulletproof is one of the last stages of drunkenness, not a state of security" http://www.linux.com/feature/60208