fnichol/chef-user — Issue #5: user::data_bag recipe doesn't read from the data bag variable
Author: apsoto
Created: 2011-12-02 20:50:21+00:00
State: open

The data_bag recipe incorrectly reads from the `node['users']` attribute, but the data bag contents are in the `users` array

```diff

diff --git a/cookbooks/user/recipes/data_bag.rb b/cookbooks/user/recipes/data_bag.rb
index a2dab5f..87877f5 100644
--- a/cookbooks/user/recipes/data_bag.rb
+++ b/cookbooks/user/recipes/data_bag.rb
@@ -25,7 +25,7 @@ rescue => ex
[]
end

-Array(node['users']).each do |i|
+users.each do |i|
u = data_bag_item(bag, i)
username = u['username'] || u['id']

```