Changeset 298

Show
Ignore:
Timestamp:
03/01/06 13:47:00 (3 years ago)
Author:
lazyatom
Message:

Mergedge rb_1.0 (r296) changes into trunk

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • login_engine/trunk/README

    r201 r298  
    294294 
    295295Currently, since not all databases appear to support structure cloning, the tests will load the entire schema into your test database, potentially blowing away any other test structures you might have. If this presents an issue for your application, comment out the line in test/test_helper.rb 
    296  
    297  
    298 = Database Schema Details 
    299  
    300 You need a database table corresponding to the User model. This is provided as a Rails Schema file, but the schema is presented below for information. Note the table type for MySQL. Whatever DB you use, it must support transactions. If it does not, the functional tests will not work properly, nor will the application in the face of failures during certain DB creates and updates. 
    301  
    302   mysql syntax: 
    303   CREATE TABLE users ( 
    304     id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 
    305     login VARCHAR(80) NOT NULL, 
    306     salted_password VARCHAR(40) NOT NULL, 
    307     email VARCHAR(60) NOT NULL, 
    308     firstname VARCHAR(40), 
    309     lastname VARCHAR(40), 
    310     salt CHAR(40) NOT NULL, 
    311     verified INT default 0, 
    312     role VARCHAR(40) default NULL, 
    313     security_token CHAR(40) default NULL, 
    314     token_expiry DATETIME default NULL, 
    315     deleted INT default 0, 
    316     delete_after DATETIME default NULL 
    317   ) TYPE=InnoDB DEFAULT CHARSET=utf8; 
    318  
    319   postgres: 
    320   CREATE TABLE "users" ( 
    321     id SERIAL PRIMARY KEY 
    322     login VARCHAR(80) NOT NULL, 
    323     salted_password VARCHAR(40) NOT NULL, 
    324     email VARCHAR(60) NOT NULL, 
    325     firstname VARCHAR(40), 
    326     lastname VARCHAR(40), 
    327     salt CHAR(40) NOT NULL, 
    328     verified INT default 0, 
    329     role VARCHAR(40) default NULL, 
    330     security_token CHAR(40) default NULL, 
    331     token_expiry TIMESTAMP default NULL, 
    332     deleted INT default 0, 
    333     delete_after TIMESTAMP default NULL 
    334   ) WITH OIDS; 
    335  
    336   sqlite: 
    337   CREATE TABLE 'users' ( 
    338     id INTEGER PRIMARY KEY, 
    339     login VARCHAR(80) NOT NULL, 
    340     salted_password VARCHAR(40) NOT NULL, 
    341     email VARCHAR(60) NOT NULL, 
    342     firstname VARCHAR(40), 
    343     lastname VARCHAR(40), 
    344     salt CHAR(40) NOT NULL, 
    345     verified INT default 0, 
    346     role VARCHAR(40) default NULL, 
    347     security_token CHAR(40) default NULL, 
    348     token_expiry DATETIME default NULL, 
    349     deleted INT default 0, 
    350     delete_after DATETIME default NULL 
    351   ); 
    352  
    353 Of course your user model can have any amount of extra fields. This is just a starting point. 
  • login_engine/trunk/app/controllers/user_controller.rb

    r281 r298  
    133133    # Email disabled... we are unable to provide the password 
    134134    if !LoginEngine.config(:use_email_notification) 
    135       flash[:message] = "Please contact the system admin at #{LoginEngine.config(:admin_email)} to retrieve your password." 
     135      flash[:message] = "Please contact the system admin at #{LoginEngine.config(:admin_email)} to reset your password." 
    136136      redirect_back_or_default :action => 'login' 
    137137      return