PHP Classes

Direkt access to files

Recommend this page to a friend!

      Secure PHP Login System  >  All threads  >  Direkt access to files  >  (Un) Subscribe thread alerts  
Subject:Direkt access to files
Summary:If I load the home.php directly I will be logged in
Messages:4
Author:Karl
Date:2015-07-23 04:56:03
 

  1. Direkt access to files   Reply   Report abuse  
Picture of Karl Karl - 2015-07-23 04:56:03
If I load the home.php directly I will be logged in
without any logindata.
I guess it will be nice to add a css file and to
add a Header.php and a footer.php and a language file.

home.php

Welcome
You have been successfully logged in.
Log Out

You registered on this website
Warning: session_start() [function.session-start]: Cannot send session cache limiter -
headers already sent (output started at /home.php:19) in class.logsys.php on line 208

Fatal error: Call to a member function prepare() on a non-object in class.logsys.php on line 638

  2. Re: Direkt access to files   Reply   Report abuse  
Picture of Subin Siby Subin Siby - 2015-07-23 12:50:57 - In reply to message 1 from Karl
You can allow users to be automatically logged in by calling the \Fr\LS::login() function in home.php

Like So :

\Fr\LS::login("username", "")

If the password parameter is left blank, the user is logged in.

  3. Re: Direkt access to files   Reply   Report abuse  
Picture of Karl Karl - 2015-07-23 18:26:32 - In reply to message 1 from Karl
normally I expect the code as ready, if you have a session
Login System the first line of all files is
session_start();
or I guess at your System on any file is
\Fr\LS::login("username", "")
then you should add this line to any of your files.

  4. Re: Direkt access to files   Reply   Report abuse  
Picture of Subin Siby Subin Siby - 2015-07-24 13:34:41 - In reply to message 3 from Karl
No, I didn't mean it like that. You said that you need to login all users automatically when they visit home.php

What I gave you was this.

Yes, the login system uses session and cookies. You can configure logSys to call session_start() automatically.

See this blog post for complete details : https://subinsb.com/php-logsys