summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
authorBryan McLellan <btm@loftninjas.org>2014-08-22 15:13:26 -0400
committerBryan McLellan <btm@loftninjas.org>2014-08-22 19:07:23 -0400
commitb82a5272ec6798cf26bcf9feaf39faae451b574d (patch)
tree830d619648a14650f67c681da588ab431e8595ed /lib/chef
parent8620abd3ea4bb3a717d24a5da2954d4843f4dcac (diff)
downloadchef-b82a5272ec6798cf26bcf9feaf39faae451b574d.tar.gz
Look up username instead of resource name
The username isn't always the same as the resource name, and we incorrectly use the latter when determining if the user exists in #load_current_resource. Fixes #1705.
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/provider/user/windows.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/user/windows.rb b/lib/chef/provider/user/windows.rb
index 350f3ff4c0..918c598774 100644
--- a/lib/chef/provider/user/windows.rb
+++ b/lib/chef/provider/user/windows.rb
@@ -28,7 +28,7 @@ class Chef
def initialize(new_resource,run_context)
super
- @net_user = Chef::Util::Windows::NetUser.new(@new_resource.name)
+ @net_user = Chef::Util::Windows::NetUser.new(@new_resource.username)
end
def load_current_resource