Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #770 #773

Closed
wants to merge 3 commits into from
Closed

Issue #770 #773

wants to merge 3 commits into from

Conversation

abmmhasan
Copy link
Contributor

This is the solution discussed in #770

Solution towards Issue #770
The code push on behalf of #770
@slaveek
Copy link
Contributor

slaveek commented Jan 3, 2016

This solution have small issue look here -> #770 (comment)

@abmmhasan
Copy link
Contributor Author

Well, I just changed according to your updated solution! in #770

panique pushed a commit that referenced this pull request Jan 5, 2016
…redirect path for usage inside subfolder installations #773
@panique
Copy link
Owner

panique commented Jan 5, 2016

Thanks, I've just merged this manually via patch file as github cannot merge this automatically (merge conflicts)

@panique panique closed this Jan 5, 2016
@panique
Copy link
Owner

panique commented Jan 5, 2016

Cool feature btw! Nice, thanks! :)

@slaveek
Copy link
Contributor

slaveek commented Jan 7, 2016

Hi I'm afraid that you didn't put all changes ;) in LoginController.
After your changes looks:

// check login status: if true, then redirect user to user/index, if false, then to login form again
if ($login_successful) {
    if (Request::post('redirect')) {
        Redirect::toPreviousViewedPageAfterLogin(ltrim(urldecode(Request::post('redirect')), '/'));
    } else {
        Redirect::to('user/index');
    }
} else {
    Redirect::to('login/index');
}

but to work this flawless we need to add more action when login is failed:

// check login status: if true, then redirect user to user/index, if false, then to login form again
if ($login_successful) {
    if (Request::post('redirect')) {
        Redirect::toPreviousViewedPageAfterLogin(ltrim(urldecode(Request::post('redirect')), '/'));
    } else {
        Redirect::to('user/index');
    }
} else {
    if (Request::post('redirect')) {
        Redirect::to('login?redirect=' . ltrim(urlencode(Request::post('redirect')), '/'));
    } else {
        Redirect::to('login/index');
    }
}

Here is a bit more #770 (comment)

@panique
Copy link
Owner

panique commented Jan 8, 2016

OH damn it :) I've just fixed this and it's now in develop branch! Thanks for the good eye for the details!

@slaveek
Copy link
Contributor

slaveek commented Jan 8, 2016

I can create pull request with that fix if you don't mind.

@panique
Copy link
Owner

panique commented Jan 8, 2016

No prob it's already in dev branch!

npuichigoB added a commit to npuichigoB/panique2 that referenced this pull request Feb 2, 2022
…redirect path for usage inside subfolder installations panique/huge#773
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants