setmsg(t('Users data updated!'), 'notice'); break; case 'remove': $token = token(); $name = isset($_REQUEST['name']) ? $_REQUEST['name'] : ''; if (!isadmin() && $me != $name) { setmsg(t('Permission Denied.')); //break; } $name = preg_replace("/[^a-z0-9]+/i", "", $name); if (!$name) { redirect('user.php'); } $user = ZUser::getUser($name); if (checkToken()) { if (ZUser::removeUser($name)) { setmsg(t('Removed!'), 'notice'); } else { setmsg(t('Error')); } } break; case 'list': default: $task = 'list'; $start = 0; $limit = 20; if ($role == 0) { // user redirect('?task=edit&name=' . $me); //$users = array(ZUser::getUser($me));
function removeUser($name, $rmFtp = 1, $rmSite = 1, $rmContent = 1) { return ZUser::removeUser($name, $rmFtp, $rmSite, $rmContent); }