Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = "";
- $email = "";
- $password = "";
- $uuid = "";
- foreach ($_POST as $key => $value) {
- switch ($key) {
- case 'username':$username = $value;break;
- case 'email':$email = $value;break;
- case 'password':$password = $value;break;
- case 'uuid':$uuid = $value;break;
- default:break;
- }
- }
- if($username!="" and $email!="" and $password!="" and $uuid!=""){
- if (!defined('RELATIVE_WBB_DIR')) define('RELATIVE_WBB_DIR', '../../httpdocs/forum/');
- require(RELATIVE_WBB_DIR.'global.php');
- require(WCF_DIR.'lib/data/user/UserProfileAction.class.php');
- require(WCF_DIR.'lib/util/UserRegistrationUtil.class.php');
- echo(\wcf\util\UserRegistrationUtil::isValidUsername('test'));
- $data = array('username' => $username,'password' => $password,'email' => $email);
- $data = array_map('trim', $data);
- //Wbb Teil
- $userAction = new \wcf\data\user\UserAction(array(), 'create', array(
- 'data' => $data,
- 'options' => array(
- '43' => $uuid
- )
- ));
- $returnValues = $userAction->executeAction();
- $user = $returnValues['returnValues'];
- echo ('USER_REGSITER_SUCCESS');
- }else{
- echo('Invalid Page');
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement