Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Development
[DEV] simpleCMS [PHP / MySQL]
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="brsy" data-source="post: 310233" data-attributes="member: 2912"><p>This is the exact design that was in the code demo, so how do the credits belong to you and Sheldos? Also, I don't see how this code works:</p><p></p><p>[PHP]if($_SESSION['id'] && !isset($_COOKIE['Remember']) && !$_SESSION['rememberMe'])</p><p>{</p><p> // If you are logged in, but you don't have the Remember cookie (browser restart)</p><p> // and you have not checked the rememberMe checkbox:</p><p></p><p> $_SESSION = array();</p><p> session_destroy();</p><p> </p><p> // Destroy the session</p><p>}[/PHP]</p><p>Maybe I'm missing something but here is what I'm reading:</p><ul> <li data-xf-list-type="ul">if ID is set, but rememberme isn't set --> logout user.</li> </ul><p>So, if the user chooses to never check the remember me box, it will logout the user upon a simple page reload. I'm pretty sure that is a horrible idea, if I am reading that correctly. Perhaps take the feature from another source, like:</p><p></p><p><a href="http://stackoverflow.com/questions/1354999/keep-me-logged-in-the-best-approach" target="_blank">http://stackoverflow.com/questions/1354999/keep-me-logged-in-the-best-approach</a></p><p><a href="http://stackoverflow.com/questions/549/the-definitive-guide-to-form-based-website-authentication/477578#477578" target="_blank">http://stackoverflow.com/questions/549/the-definitive-guide-to-form-based-website-authentication/477578#477578</a></p></blockquote><p></p>
[QUOTE="brsy, post: 310233, member: 2912"] This is the exact design that was in the code demo, so how do the credits belong to you and Sheldos? Also, I don't see how this code works: [PHP]if($_SESSION['id'] && !isset($_COOKIE['Remember']) && !$_SESSION['rememberMe']) { // If you are logged in, but you don't have the Remember cookie (browser restart) // and you have not checked the rememberMe checkbox: $_SESSION = array(); session_destroy(); // Destroy the session }[/PHP] Maybe I'm missing something but here is what I'm reading: [LIST] [*]if ID is set, but rememberme isn't set --> logout user. [/LIST] So, if the user chooses to never check the remember me box, it will logout the user upon a simple page reload. I'm pretty sure that is a horrible idea, if I am reading that correctly. Perhaps take the feature from another source, like: [url]http://stackoverflow.com/questions/1354999/keep-me-logged-in-the-best-approach[/url] [url]http://stackoverflow.com/questions/549/the-definitive-guide-to-form-based-website-authentication/477578#477578[/url] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Development
[DEV] simpleCMS [PHP / MySQL]
Top