使用设计在rails 5中进行身份验证

时间:2018-02-08 14:53:13

标签: mysql ruby-on-rails devise

我正在使用Devise gem进行身份验证,我需要使用Moodle 2.7使用的相同数据库,因此我无法对其进行修改。

有没有办法使用valid_password?()考虑Moodle 2.7数据库结构?

我的用户模型是:

create_table "mdl_user", id: :bigint, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", comment: "One record for each person" do |t|
  t.string  "auth",  
  t.boolean "confirmed",   
  t.boolean "policyagreed",        
  t.boolean "deleted", 
  t.boolean "suspended",
  t.bigint  "mnethostid",
  t.string  "username",         
  t.string  "password",                            
  t.string  "idnumber",                            
  t.string  "firstname",        
  t.string  "lastname",       
  t.string  "email",             
  t.boolean "emailstop",             
  t.string  "icq",               
  t.string  "skype",             
  t.string  "yahoo",
  t.string  "aim",
  t.string  "msn",          
  t.string  "phone1",
  t.string  "phone2",         
  t.string  "institution",  

end

0 个答案:

没有答案