app/controllers/auth_controller.rb
# logout. id is all or login provider
logout. id is all or login provider
logout . id is all or login provider
def destroy
    if User.dummy_users?(@users)
      save_flash_key '.already_logged_off'
      redirect_to :action => :index
      return
    end
    provider = params[:id].to_s
    if provider != "all" and !valid_omniauth_provider?(provider)
      logger.debug2 "1: unknown provider #{provider}"
      save_flash_key '.unknown_provider'
      redirect_to :action => :index
      return
    end
    if provider == 'all'
      provider = @users.first.provider if @users.size == 1 
      logout()
    else
      logout(provider)
    end
    if !@users.first.dummy_user?
      save_flash_key '.logged_off', :appname => APP_NAME, :apiname => provider_downcase(provider)
      if params[:return_to]
        redirect_to params[:return_to]
      else
        redirect_to :action => :index
      end
      return
    end
    if provider == 'all' or !(api_url = API_URL[provider])
      redirect_to :action => :index
    elsif
      redirect_to api_url
    end
  end
def destroy if User . dummy_users? ( @users ) save_flash_key '.already_logged_off' redirect_to :action => :index return end provider = params [ :id ] . to_s if provider != "all" and ! valid_omniauth_provider? ( provider ) logger . debug2 "1: unknown provider #{provider}" save_flash_key '.unknown_provider' redirect_to :action => :index return end if provider == 'all' provider = @users . first . provider if @users . size == 1 logout ( ) else logout ( provider ) end if ! @users . first . dummy_user? save_flash_key '.logged_off' , :appname => APP_NAME , :apiname => provider_downcase ( provider ) if params [ :return_to ] redirect_to params [ :return_to ] else redirect_to :action => :index end return end if provider == 'all' or ! ( api_url = API_URL [ provider ] ) redirect_to :action => :index elsif redirect_to api_url end end
logout.
logout .
# redirect to this provider after logout # redirect to api or redirect to auth/index page # user logged in with other login provider(s) # logout from users/edit page. return to users/index?friends=me