Show
Ignore:
Timestamp:
12/28/2007 12:35:42 PM (13 months ago)
Author:
Shadowhand
Message:

Added "remember me" functionality to Auth.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/auth/config/auth.php

    r1362 r1636  
    77 * In order to log a user in, a user must have the `login` role. You may create 
    88 * and assign any other role to your users. 
    9  * 
    10  * Database table schemas: 
    11  * <code sql> 
    12  * CREATE TABLE IF NOT EXISTS `users` ( 
    13  *   `id` int(11) unsigned NOT NULL auto_increment, 
    14  *   `email` varchar(127) NOT NULL, 
    15  *   `username` varchar(32) NOT NULL default '', 
    16  *   `password` char(50) NOT NULL, 
    17  *   `logins` int(10) unsigned NOT NULL default '0', 
    18  *   PRIMARY KEY  (`id`), 
    19  *   UNIQUE KEY `uniq_username` (`username`), 
    20  *   UNIQUE KEY `uniq_email` (`email`) 
    21  * ) ENGINE=MyISAM  DEFAULT CHARSET=utf8; 
    22  * 
    23  * CREATE TABLE IF NOT EXISTS `roles` ( 
    24  *   `id` int(11) unsigned NOT NULL auto_increment, 
    25  *   `name` varchar(32) NOT NULL, 
    26  *   `description` varchar(255) NOT NULL, 
    27  *   PRIMARY KEY  (`id`), 
    28  *   UNIQUE KEY `uniq_name` (`name`) 
    29  * ) ENGINE=MyISAM  DEFAULT CHARSET=utf8; 
    30  * 
    31  * INSERT INTO `roles` (`id`, `name`, `description`) VALUES (1, 'login', 'Login access privileges'); 
    32  * 
    33  * CREATE TABLE IF NOT EXISTS `users_roles` ( 
    34  *   `user_id` int(10) unsigned NOT NULL, 
    35  *   `role_id` int(10) unsigned NOT NULL, 
    36  *   PRIMARY KEY  (`user_id`,`role_id`) 
    37  * ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
    38  * </code> 
    399 */ 
    4010 
     
    4919 
    5020/** 
    51  * Defines the hash offsets to 
     21 * Defines the hash offsets to insert the salt at. The password hash length 
     22 * will be increased by the total number of offsets. 
    5223 */ 
    5324$config['salt_pattern'] = '1, 3, 5, 9, 14, 15, 20, 21, 28, 30'; 
     25 
     26/** 
     27 * Set the auto-login (remember me) cookie lifetime, in seconds. The default 
     28 * lifetime is two weeks. 
     29 */ 
     30$config['lifetime'] = 1209600;