public function createAccountSubmit() { $rules = array("username" => "required|min:6", "password" => "required|min:6", "confirm_password" => "required|same:password", "email" => "required"); $validator = Validator::make(Input::all(), $rules); if ($validator->fails()) { $messages = $validator->messages(); return Redirect::to("create")->withInput(Input::except('password', 'password_confirm'))->withErrors($validator); } $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $username = $_POST['username']; $password = $_POST['password']; $confirm_password = $_POST['confirm_password']; $email = $_POST['email']; $organization = $_POST['organization']; $address = $_POST['address']; $country = $_POST['country']; $telephone = $_POST['telephone']; $mobile = $_POST['mobile']; $im = $_POST['im']; $url = $_POST['url']; if (WSIS::usernameExists($username)) { return Redirect::to("create")->withInput(Input::except('password', 'password_confirm'))->with("username_exists", true); } else { WSIS::addUser($username, $password, $first_name, $last_name, $email, $organization, $address, $country, $telephone, $mobile, $im, $url); CommonUtilities::print_success_message('New user created!'); return View::make('account/login'); } }