Jump to content

php remember me


TEE

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/282800-php-remember-me/#findComment-1453049
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.