Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //After 778 string in /wp-login.php
- $errors = register_new_user($user_login, $user_email);
- //registerUserForUnity
- require_once "db-unity/db.php";
- $user = R::dispense('users');
- if ($user) {
- $user->username = $_POST['user_login'];
- $user->email = $_POST['user_email'];
- $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
- $charactersLength = strlen($characters);
- $randomString = '';
- for ($i = 0; $i < 10; $i++) {
- $randomString .= $characters[rand(0, $charactersLength - 1)];
- }
- $tmp = $randomString;
- while(R::findOne('wp_users', 'UID = ?', [$tmp]))
- {
- $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
- $charactersLength = strlen($characters);
- $randomString = '';
- for ($i = 0; $i < 10; $i++) {
- $randomString .= $characters[rand(0, $charactersLength - 1)];
- }
- $tmp = $randomString;
- }
- $user->uid = $tmp;
- $user->gameDataJson0 = "Empty JSON";
- $user->gameDataJson1 = "Empty JSON";
- $user->gameDataJson2 = "Empty JSON";
- $user->gameDataJson3 = "Empty JSON";
- $user->name = "";
- $user->surname = "";
- $user->middlename = "";
- $user->specialty_1 = "Empty";
- $user->priority_1 = "0";
- $user->zno_competition_score_1 = "0";
- $user->specialty_2 = "Empty";
- $user->priority_2 = "0";
- $user->zno_competition_score_2 = "0";
- $user->specialty_3 = "Empty";
- $user->priority_3 = "0";
- $user->zno_competition_score_3 = "0";
- R::store($user);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement