$err['password'] = t('Password can not be empty.'); $break = true; } // check domain if (true !== ($res = ZVhosts::chkDomain($domain))) { $err['domain'] = t('Domain Invalid.'); if ($res == 'occupied') { $err['domain'] = t('Domain Occupied.'); } $break = true; } if ($break) { break; } // execute! $r1 = ZUser::adduser_request($username, $password, $package); $r2 = ZVhosts::addvhost($username, $domain); $r3 = ZDatabase::addmysqluser($username, $password); setmsg(t('Adduser request pending. It will take a few minutes to take into effect.'), 'notice'); } 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');
function adduser_request($user, $pass, $package) { return ZUser::adduser_request($user, $pass, $package); }