public function createAccountSubmit() { $rules = array("username" => "required|min:6", "password" => "required|min:6", "confirm_password" => "required|same:password", "email" => "required|email"); $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']; $email = $_POST['email']; //Fixme - Save these user information // $organization = $_POST['organization']; // $address = $_POST['address']; // $country = $_POST['country']; // $telephone = $_POST['telephone']; // $mobile = $_POST['mobile']; // $im = $_POST['im']; // $url = $_POST['url']; $organization = ""; $address = ""; $country = ""; $telephone = ""; $mobile = ""; $im = ""; $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); //update user profile WSIS::updateUserProfile($username, $email, $first_name, $last_name); //creating a default project for user ProjectUtilities::create_default_project($username); CommonUtilities::print_success_message('New user created!'); return View::make('account/login'); } }