Exemple #1
0
     }
     break;
 case 'edit':
     $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');
     }
     $package = ZPackage::getUserPackage($name);
     $packages = ZPackage::getPackages();
     $shells = ZShell::getShells();
     $user = ZUser::getUser($name);
     if (!$user) {
         setmsg(t('No such user or this user is waiting for activation.'));
     }
     $op = @$_REQUEST['op'];
     if (checktoken()) {
         if ('chpasswd' == $op) {
             $new = $_REQUEST['password'];
             $res = ZUser::chpasswd_request($name, $new);
             $message = t("Password modification request submited. Please wait for a few minutes.");
             setmsg($message, 'notice', 'self');
         }
         if ('setpkg' == $op) {
             isadmin() || setmsg(t('Permission Dennied.'));
             $new = intval($_REQUEST['package']);
function getShells()
{
    return ZShell::getShells();
}