Created
August 9, 2009 06:14
-
-
Save fedesoria/164635 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create | |
logout_keeping_session! | |
if using_open_id? | |
authenticate_with_open_id(params[:openid_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']) | |
else | |
failed_creation(result.message || "Sorry, something went wrong") | |
end | |
end | |
else | |
create_new_user(params[:user]) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment