Advertisement
gatno

Untitled

Jan 23rd, 2018
1,986
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.13 KB | None | 0 0
  1. <?php
  2.  
  3. $username = "";
  4. $email = "";
  5. $password = "";
  6. $uuid = "";
  7.  
  8. foreach ($_POST as $key => $value) {
  9.     switch ($key) {
  10.         case 'username':$username = $value;break;
  11.         case 'email':$email = $value;break;
  12.         case 'password':$password = $value;break;
  13.         case 'uuid':$uuid = $value;break;
  14.         default:break;
  15.     }
  16. }
  17.  
  18. if($username!="" and $email!="" and $password!="" and $uuid!=""){
  19.     if (!defined('RELATIVE_WBB_DIR')) define('RELATIVE_WBB_DIR', '../../httpdocs/forum/');
  20.     require(RELATIVE_WBB_DIR.'global.php');
  21.     require(WCF_DIR.'lib/data/user/UserProfileAction.class.php');
  22.     require(WCF_DIR.'lib/util/UserRegistrationUtil.class.php');
  23.     echo(\wcf\util\UserRegistrationUtil::isValidUsername('test'));
  24.        
  25.     $data = array('username' => $username,'password' => $password,'email' => $email);
  26.     $data = array_map('trim', $data);
  27.        
  28.         //Wbb Teil
  29.     $userAction = new \wcf\data\user\UserAction(array(), 'create', array(
  30.             'data' => $data,
  31.             'options' => array(
  32.               '43' => $uuid
  33.             )
  34.     ));
  35.     $returnValues = $userAction->executeAction();
  36.     $user = $returnValues['returnValues'];
  37.     echo ('USER_REGSITER_SUCCESS');
  38. }else{
  39.     echo('Invalid Page');
  40. }
  41. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement