lib/gratan/client.rb in gratan-0.2.7 vs lib/gratan/client.rb in gratan-0.2.8.beta
- old
+ new
@@ -97,10 +97,14 @@
def create_user(user, host, attrs)
attrs[:options] ||= {}
unless attrs[:options].has_key?(:identified)
identified = @options[:identifier].identify(user, host)
- attrs[:options][:identified] = identified if identified
+
+ if identified
+ attrs = attrs.dup
+ attrs[:options][:identified] = identified
+ end
end
@driver.create_user(user, host, attrs)
update!
end