From ed96ab1cf5381bfdc8882396e42b99199eb2d3e9 Mon Sep 17 00:00:00 2001 From: Sean Grove Date: Wed, 16 Nov 2011 11:38:23 -0800 Subject: [PATCH] BUSHIDO_FIX: Adds bushido hooks user.added user.removed, and updates app.claimed to work with bushido_user_id as the permanent id Conflicts: lib/locomotive/hosting/bushido/hooks.rb --- lib/locomotive/hosting/bushido/hooks.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/locomotive/hosting/bushido/hooks.rb b/lib/locomotive/hosting/bushido/hooks.rb index 32acb478..d0d552a8 100644 --- a/lib/locomotive/hosting/bushido/hooks.rb +++ b/lib/locomotive/hosting/bushido/hooks.rb @@ -41,11 +41,8 @@ module Locomotive Locomotive.log "Devise username column: #{::Devise.cas_username_column}=" Locomotive.log "Removing username: #{event['data'].try(:[], 'ido_id')}" - ido_id = event['data'].try(:[], 'ido_id') - - ido_id and - Account.exists?(::Devise.cas_username_column => ido_id) and - Account.where(::Devise.cas_username_column => ido_id).destroy + Account.exists?(::Devise.cas_username_column => event['data'].try(:[], 'ido_id')) and + Account.where(::Devise.cas_username_column => event['data'].try(:[], 'ido_id')).destroy end end