Fixed a bug in the OpenID login when a user signed up with OpenID but hasn't

been activated yet.

When logging in the user would come back to the login page with the back_url
of My Page.  This was caused by open_id_authenticate sending the user to My Page
and My Page redirecting the user back to the login page because they haven't
been activated.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2482 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis committed 2009-02-20 00:16:45 +00:00
1 parent 9525e5f147
commit aed1787d51
2 files changed
+26 -3

No files matched your search

+11 -3
View File
@@ -209,7 +209,11 @@ private
end
else
# Existing record
successful_authentication(user)
if user.active?
successful_authentication(user)
else
account_pending
end
end
end
end
@@ -269,10 +273,14 @@ private
if user.save
# Sends an email to the administrators
Mailer.deliver_account_activation_request(user)
flash[:notice] = l(:notice_account_pending)
redirect_to :action => 'login'
account_pending
else
yield if block_given?
end
end
def account_pending
flash[:notice] = l(:notice_account_pending)
redirect_to :action => 'login'
end
end