- @tokens = @user.oauth_tokens.find :all, :conditions => 'oauth_tokens.invalidated_at is null and oauth_tokens.authorized_at is not null'
-
- if params[:open_id_complete]
- # The redirect from the OpenID provider reenters here
- # again and we need to pass the parameters through to
- # the open_id_authentication function
- @user = session.delete(:new_user)
- openid_verify(nil, @user) do |user|
- update_user(user)
- end
- elsif params[:user] and params[:user][:display_name] and params[:user][:description]
- @user.display_name = params[:user][:display_name]
- @user.new_email = params[:user][:new_email]
-
- if params[:user][:pass_crypt].length > 0 or params[:user][:pass_crypt_confirmation].length > 0
- @user.pass_crypt = params[:user][:pass_crypt]
- @user.pass_crypt_confirmation = params[:user][:pass_crypt_confirmation]
- end
-
- @user.description = params[:user][:description]
- @user.languages = params[:user][:languages].split(",")
-
- case params[:image_action]
- when "new" then @user.image = params[:user][:image]
- when "delete" then @user.image = nil
- end
-
- @user.home_lat = params[:user][:home_lat]
- @user.home_lon = params[:user][:home_lon]
-
- @user.openid_url = nil if params[:user][:openid_url].empty?