Skip to content
Browse files

minor view changes

  • Loading branch information...
1 parent 792a328 commit a78c35ae5c81a7a90166f5a3c2acdbe25cee08b5 Javier Vazquez Rodriguez committed May 2, 2009
View
4 app/models/user.rb
@@ -4,12 +4,14 @@ class User < ActiveRecord::Base
# optional, but if a user registers by openid, he should at least share his email-address with the app
c.validate_email_field = false
# fetch the email either by sreg or ax
- c.required_fields = [:email,"http://axschema.org/contact/email"]
+ c.required_fields = ["http://axschema.org/contact/email"]
+ c.optional_fields = [:email, :nickname]
end
private
def map_openid_registration(registration)
+
if registration.empty?
# No email returned
self.email_autoset = false
View
2 app/views/layouts/application.html.erb
@@ -14,7 +14,7 @@
<span style="float: right; text-align: right;"><%= link_to "Source Code", "http://github.com/vazqujav/authlogic_openid_selector_example" %></span>
<h1>Authlogic OpenID-Selector Example App</h1>
-<%= pluralize User.logged_in.count, "user" %> currently logged in<br /> <!-- This based on last_request_at, if they were active < 10 minutes they are logged in -->
+<%= pluralize User.logged_in.count, "user" %> currently logged in (<%= pluralize User.all.size, "user" %> registered)<br /> <!-- This based on last_request_at, if they were active < 10 minutes they are logged in -->
<br />
<br />
View
1 vendor/plugins/open_id_authentication/lib/open_id_authentication.rb
@@ -169,7 +169,6 @@ def complete_open_id_authentication
profile_data.merge! data_response.from_success_response( open_id_response ).data
end
end
-
yield Result[:successful], identity_url, profile_data
when OpenID::Consumer::CANCEL
yield Result[:canceled], identity_url, nil

0 comments on commit a78c35a

Please sign in to comment.
Something went wrong with that request. Please try again.