Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

picasa invite redirects to signup page if no current user

  • Loading branch information...
commit f49ac5abaed9ef52446f619085b27a8549a6790f 1 parent dc6ca17
@altay authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 app/controllers/photos_controller.rb
View
8 app/controllers/photos_controller.rb
@@ -67,8 +67,12 @@ def invite
else
# we're not using omniauth for picasa, so it needs a special auth url.
if provider=='picasa'
- session[:return_to] = Picasa.authorization_url(url_for(:controller => "picasa", :action => "authorize"))
- redirect_to signup_url and return
+ if current_user.nil?
+ session[:return_to] = Picasa.authorization_url(url_for(:controller => "picasa", :action => "authorize"))
+ redirect_to signup_url and return
+ else
+ redirect_to Picasa.authorization_url(url_for(:controller => "picasa", :action => "authorize")) and return
+ end
else
redirect_to "/auth/#{provider}"
end
Please sign in to comment.
Something went wrong with that request. Please try again.