Skip to content

Commit

Permalink
Fixed OpenID login and signup
Browse files Browse the repository at this point in the history
  • Loading branch information
ariejan committed Dec 22, 2008
1 parent 3fac4e0 commit 8942237
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 43 deletions.
2 changes: 1 addition & 1 deletion app/controllers/users_controller.rb
Expand Up @@ -90,7 +90,7 @@ def create
authenticate_with_open_id(params[:open_id_url], :return_to => open_id_create_url,
:required => [:nickname, :email]) do |result, identity_url, registration|
if result.successful?
create_new_user(:identity_url => identity_url, :login => registration['nickname'], :email => registration['email'])
create_new_user(:identity_url => identity_url, :login => identity_url, :email => registration['email'])
else
failed_creation(result.message || "Sorry, something went wrong")
end
Expand Down
41 changes: 0 additions & 41 deletions app/models/user.rb
Expand Up @@ -97,46 +97,5 @@ def create_profile
# Give the user a profile
self.profile = Profile.create
end

# --------

# Virtual attribute for the unencrypted password
# attr_accessor :password

# Per page pagination
# TODO: Replace with searchgasm
# cattr_reader :per_page
# @@per_page = 25




# Encrypts some data with the salt.
# def self.encrypt(password, salt)
# Digest::SHA1.hexdigest("--#{salt}--#{password}--")
# end





# before filter
# def encrypt_password
# return if password.blank?
# self.salt = Digest::SHA1.hexdigest("--#{Time.now.to_s}--#{login}--") if new_record?
# self.crypted_password = encrypt(password)
# end



# def do_delete
# self.deleted_at = Time.now.utc
# end
#
# def do_activate
# self.activated_at = Time.now.utc
# self.deleted_at = self.activation_code = nil
# end


end
2 changes: 1 addition & 1 deletion app/views/users/new.rhtml
@@ -1,4 +1,4 @@
<% @user.password = @user.password_confirmation = nil %>
<% (@user.password = @user.password_confirmation = nil) rescue nil %>
<% content_for :header do -%>
Create a new <%= configatron.site_name %> account
Expand Down

0 comments on commit 8942237

Please sign in to comment.