summaryrefslogtreecommitdiff
path: root/lib/chef/user.rb
diff options
context:
space:
mode:
authorSteven Danna <steve@opscode.com>2013-02-04 11:23:21 -0800
committerBryan McLellan <btm@opscode.com>2013-02-06 09:51:03 -0800
commit85fc6fe19e351396ab19ccafa08d2767ad170ffb (patch)
treecb57316129f47031f90bfeb152f40d12312a901c /lib/chef/user.rb
parent8f1acf35b0c7a6d365c88a42abbe8e6f4fd86998 (diff)
downloadchef-85fc6fe19e351396ab19ccafa08d2767ad170ffb.tar.gz
Ensure a Chef::User object is returned from #reregister
Diffstat (limited to 'lib/chef/user.rb')
-rw-r--r--lib/chef/user.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/chef/user.rb b/lib/chef/user.rb
index 33fc7d0456..3f592e4b65 100644
--- a/lib/chef/user.rb
+++ b/lib/chef/user.rb
@@ -111,6 +111,7 @@ class Chef
r = Chef::REST.new(Chef::Config[:chef_server_url])
reregistered_self = r.put_rest("users/#{name}", { :name => name, :admin => admin, :private_key => true })
private_key(reregistered_self["private_key"])
+ self
end
def to_s