Gitamin\Http\Controllers\Auth\AuthController::postRegister PHP Method

postRegister() public method

public postRegister ( )
    public function postRegister()
    {
        $userData = Input::only(['username', 'email', 'password', 'password_confirmation', 'verifycode']);
        $verifycode = array_pull($userData, 'verifycode');
        try {
            $user = $this->create($userData);
        } catch (ValidationException $e) {
            return Redirect::to('auth/register')->withTitle(sprintf('%s %s', trans('gitamin.whoops'), trans('gitamin.users.add.failure')))->withInput(Input::all())->withErrors($e->getMessageBag());
        }
        Auth::guard($this->getGuard())->login($user);
        return redirect($this->redirectPath());
    }