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
[Feature Request] - Redirect login page if already logged in #2249
Comments
I agree that this should redirect, or give a 403 permission denied error (and indicate that you're already logged in). |
seeing that codes makes we wonder what's the difference between |
|
Well, this I understand, but why do we need both? isRegistered is also a bit strange because if I fetch another user object (!= current user) and then call isRegistered I get true which kind of obvious but also useless.. |
Well that's not entirely true. If you attempt to fetch a user object that doesn't exist in the database for instance then this would return false. Also, you'd probably want to make sure that the user isActive as well as registered. Ultimately I would think we would want to get away from using the current implementation of the |
Of course, there are a few edge cases like that, just wanted to point out that those method might need some attention, didn't want to hijack this issue.. |
I think the sad answer is just duplicate crusty code. I think we'd want to keep isRegistered() and alias isLoggedIn() over to isRegistered() (setting aside any concerns about how isRegistered() actually populates its own data – it should be the canonical, proper method.) |
Seems like a good addition |
Another thing, the login page could technically be an editable page, to edit it, you need to be able to get to that page... |
I have a working branch somewhere that shows "log out" as an option if On Wed, Apr 15, 2015, 8:46 PM Andrew Embler notifications@github.com
|
We are going to update this page so that the authentication types don't show up when you're logged in - you just get a logout button. This should allow you to still edit the content on the page. |
Hey,
Is there a reason the login page doesn't redirect you if you're already logged in?
I can't think of a reason why we shouldn't redirect already logged in users.
Seems like a fairly easy thing to do seeing there is already a "ChooseRedirect" function inside the login controller.
Anyway, this would be my suggestion.
File: /web/concrete/controllers/single_page/login.php
The text was updated successfully, but these errors were encountered: