{ $user = get_user($post['uid']); $post['username'] = $user['username'];
} // if the uid is 0 verify the username else if($post['uid'] == 0 && $post['username'] != $lang->guest) { // Set up user handler require_once MYBB_ROOT."inc/datahandlers/user.php"; $userhandler = new UserDataHandler(); $data_array = array('username' => $post['username']); $userhandler->set_data($data_array); if(!$userhandler->verify_username()) { // invalid username $this->errors = array_merge($this->errors, $userhandler->get_errors()); return false; }
} // After all of this, if we still don't have a username, force the username as "Guest" (Note, this is not translatable as it is always a fallback)