login_sugar_generator 0.9.5 → 0.9.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/templates/README CHANGED
@@ -177,12 +177,13 @@ automatically on startup.
177
177
  == Changelog
178
178
 
179
179
  login_sugar
180
- 0.9.5 security updates. compatible with rails 1.2.3
181
- 0.9.4 removed scaffold references, removed localization, added generator rake task
182
- 0.9.3 fixed Clock.now, symbolized session references
183
- 0.9.2 fixed localization reference for sign in form (thanks Nym)
184
- 0.9.1 fixed double first_name replacing last_name (thanks BobF)
185
- 0.9.0 first release, modified salted_login 1.1.1
180
+ 0.9.5.1 applied sql patches from Felipe Hoffa
181
+ 0.9.5 security updates. compatible with rails 1.2.3
182
+ 0.9.4 removed scaffold references, removed localization, added generator rake task
183
+ 0.9.3 fixed Clock.now, symbolized session references
184
+ 0.9.2 fixed localization reference for sign in form (thanks Nym)
185
+ 0.9.1 fixed double first_name replacing last_name (thanks BobF)
186
+ 0.9.0 first release, modified salted_login 1.1.1
186
187
 
187
188
  salted_login
188
189
 
Binary file
data/templates/user.rb CHANGED
@@ -24,9 +24,9 @@ class <%= class_name %> < ActiveRecord::Base
24
24
  end
25
25
 
26
26
  def self.authenticate(login, pass)
27
- u = find( :first, :conditions => ["login = ? AND verified = TRUE AND deleted = FALSE", login])
27
+ u = find( :first, :conditions => ["login = ? AND verified = ? AND deleted = ?", login, true, false])
28
28
  return nil if u.nil?
29
- find( :first, :conditions => ["login = ? AND salted_password = ? AND verified = TRUE", login, salted_password(u.salt, hashed(pass))])
29
+ find( :first, :conditions => ["login = ? AND salted_password = ? AND verified = ?", login, salted_password(u.salt, hashed(pass)), true])
30
30
  end
31
31
 
32
32
  def self.authenticate_by_token(id, token)
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: login_sugar_generator
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.9.5
7
- date: 2007-05-30 00:00:00 -07:00
6
+ version: 0.9.5.1
7
+ date: 2007-07-18 00:00:00 -07:00
8
8
  summary: A modification of the Salted Hash Login Generator that works with Rails 1.1.[456]
9
9
  require_paths:
10
10
  - lib