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

Like putting the login page at the beginning so that the user only has access after logging in. #261

Open
jailton2018 opened this issue Jan 16, 2017 · 8 comments

Comments

@jailton2018
Copy link

Hi, I'd like to know how to put the login page in the beginning so that the user only has access to log on first.
Thank you very much in advance!

@Esysc
Copy link

Esysc commented Jan 20, 2017

Hello, there are some examples on closed issues , look at #78 . I personally did it more simple, just put the logic in index.php checking if valid user is logged, if not redirect to login.php . I use LDAP in my environment, then after validation redirect to the requested page.

@jailton2018
Copy link
Author

Hi, thanks for the help.
If you could pass the code of this solution that you found, I am a beginner with php and mvc.
Thank you!

@Esysc
Copy link

Esysc commented Jan 25, 2017 via email

@jailton2018
Copy link
Author

Hi,
Let me see if I understand, I have to change this code in the secureExample.php page? For that page that is responsible for the login, correct?

@Esysc
Copy link

Esysc commented Jan 31, 2017

Hello, you can use the example if you prefer and look orders threads. I simply check a session variable, not so elegant, but the app runs on corporate. Look in index.php, if the session is not set redirect to login.php . This script validate the user then redirect to the requested url. I put the check in index.php because every routed url pass there.

@jailton2018
Copy link
Author

Hello
I copied the file login.php Example Its and I pasted index and it does not give place that I deleted or code that was in it to leave it or to make Example Its, redirects IT to a page of login of Its Example, to put more I COME does not PASSWORD That phreeze, DO NOT give is more right.

@Esysc
Copy link

Esysc commented Feb 1, 2017

Don't know if I have understood., but the code is just an example, cannot run in your environment. I proposed you just to give a look for inspiration. Bit not copy and paste as is

@jailton2018
Copy link
Author

Ok, I got confused I thought this project you were doing was using phreeze frameworks, because it's a good framework for beginners, but the bad part is we do not have much information about it.
But I thank you for your attention and help!

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

No branches or pull requests

2 participants