protected function onSuccess()
    {
        $redirectionUrl = "";

        // First check if the model has a target for redirection in mind.
        if (isset($this->model->redirectUrl)) {
            $redirectionUrl = $this->model->redirectUrl;
        }

        if (!$redirectionUrl){
            // Finally fallback to the Leave's default success URL:
            $redirectionUrl = $this->getDefaultSuccessUrl();
        }

        if (!$redirectionUrl){
            $redirectionUrl = "/";
        } else {
            // Check any supplied redirection URL is on the same host
            if (!$this->isRedirectionUrlValid($redirectionUrl)){
                $redirectionUrl = "/";
            }
        }

        throw new ForceResponseException(new RedirectResponse($redirectionUrl));
    }
protected function onSuccess()
    {
        $redirectionUrl = "";

        // First check if the model has a target for redirection in mind.
        if (isset($this->model->redirectUrl)) {
            $redirectionUrl = $this->model->redirectUrl;
        }

        if (!$redirectionUrl){
            // Finally fallback to the Leave's default success URL:
            $redirectionUrl = $this->getDefaultSuccessUrl();
        }

        if (!$redirectionUrl){
            $redirectionUrl = "/";
        } else {
            // Check any supplied redirection URL is on the same host
            if (!$this->isRedirectionUrlValid($redirectionUrl)){
                $redirectionUrl = "/";
            }
        }

        throw new ForceResponseException(new RedirectResponse($redirectionUrl));
    }
protected function onSuccess ( ) { $ redirectionUrl = "" ; // First check if the model has a target for redirection in mind. if ( isset ( $ this -> model -> redirectUrl ) ) { $ redirectionUrl = $ this -> model -> redirectUrl ; } if ( ! $ redirectionUrl ) { // Finally fallback to the Leave's default success URL: $ redirectionUrl = $ this -> getDefaultSuccessUrl ( ) ; } if ( ! $ redirectionUrl ) { $ redirectionUrl = "/" ; } else { // Check any supplied redirection URL is on the same host if ( ! $ this -> isRedirectionUrlValid ( $ redirectionUrl ) ) { $ redirectionUrl = "/" ; } } throw new ForceResponseException ( new RedirectResponse ( $ redirectionUrl ) ) ; }
Handles the behaviour if the login is successful.

The default implementation is to redirect to
1) Our model's `redirectUrl` property
2) A URL (within the current site) specified on the URL base64 encoded
(e.g /login/L2NvbmdyYXRzLWZvci1jaGVja2luZy8=)
3) The URL provided by `getDefaultSuccessUrl()`

The first of those to return a value is used for the redirection.

@return bool|string
@throws ForceResponseException
Handles the behaviour if the login is successful .