function random_student() { $email = "test_" . rand(); $uid = BoincUser::insert("(email_addr) values ('{$email}')"); if (!$uid) { echo "can't add user"; exit; } $sex = rand(1, 2); $birth_year = rand(1938, 1998); BoltUser::insert("(user_id, sex, birth_year) values ({$uid}, {$sex}, {$birth_year})"); return $uid; }