TEE Posted October 8, 2013 Share Posted October 8, 2013 Does anyone have an working example of the php remember me form github.com? Not really sure on the database part of it? https://github.com/gbirke/rememberme Any help would be very thankful. Quote Link to comment Share on other sites More sharing options...
Solution Ch0cu3r Posted October 8, 2013 Solution Share Posted October 8, 2013 You need to create a new table for where the tokens generated by the rememberMe class are stored in your database. The table needs four columns which are credential, token, persistent_token and expires. The credential, token, and persistent_token columns hold sha1 string values. The expires column holds a date/time value. When you initiate the rememberMe storage database class you pass in the following associative array array( 'connection' => YOUR EXISTING PDO DATABASE CONNECTION, 'tableName' => 'TOKENS TABLE NAME', /* DATABASE TABLE COLUMN NAMES */ 'credentialColumn' => 'credential', 'tokenColumn' => 'token', 'persistentTokenColumn' => 'persistent_token', 'expiresColumn' => 'expires' ); To implement the rememberMe class you'll need to look at the example code in the example folder. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.