headstart 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.0
1
+ 0.6.1
@@ -11,7 +11,9 @@ class Headstart::PasswordsController < ApplicationController
11
11
  end
12
12
 
13
13
  def create
14
- if user = ::User.find_by_email(params[:password][:email])
14
+ email = params[:password][:email]
15
+ email.downcase! if email.present?
16
+ if user = ::User.find_by_email(email)
15
17
  user.forgot_password!
16
18
  if user.password_reset_token.present?
17
19
  if Headstart.configuration.use_delayed_job
@@ -29,6 +29,7 @@ class Headstart::UsersController < ApplicationController
29
29
 
30
30
  def create
31
31
  @user = ::User.new params[:user]
32
+ @user.email.downcase! if @user.email.present?
32
33
  if @user.save
33
34
  sign_in(@user)
34
35
  flash[:notice] = 'You have successfully signed up.'
@@ -45,6 +46,7 @@ class Headstart::UsersController < ApplicationController
45
46
 
46
47
  def update
47
48
  @user = current_user
49
+ @user.email.downcase! if @user.email.present?
48
50
  if @user.update_attributes(params[:user])
49
51
  flash[:success] = 'Your profile has been updated.'
50
52
  redirect_back_or(user_path(@user))
@@ -245,6 +245,7 @@ module Headstart
245
245
  # @example
246
246
  # User.authenticate("email@example.com", "password")
247
247
  def authenticate(email, password)
248
+ email.downcase! if email.present?
248
249
  return nil unless user = find_by_email(email)
249
250
  return user if user.authenticated?(password)
250
251
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: headstart
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 0
10
- version: 0.6.0
9
+ - 1
10
+ version: 0.6.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Bran Burridge
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-16 00:00:00 -04:00
18
+ date: 2010-09-22 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency