$uid), array("limit" => 1)); call_hooks('remove_user', $r); // save username (actually the nickname as it is guaranteed // unique), so it cannot be re-registered in the future. dba::insert('userd', array('username' => $r['nickname'])); // The user and related data will be deleted in "cron_expire_and_remove_users" (cronjobs.php) q("UPDATE `user` SET `account_removed` = 1, `account_expires_on` = UTC_TIMESTAMP() WHERE `uid` = %d", intval($uid)); Worker::add(PRIORITY_HIGH, "Notifier", "removeme", $uid); // Send an update to the directory Worker::add(PRIORITY_LOW, "Directory", $r['url']); if ($uid == local_user()) { unset($_SESSION['authenticated']); unset($_SESSION['uid']); goaway(System::baseUrl()); } } }