active_directory icon indicating copy to clipboard operation
active_directory copied to clipboard

Argument error

Open nextgenappsllc opened this issue 9 years ago • 2 comments

I am getting the following error when calling methods like disabled? and locked? on certain users:

ArgumentError: method name must be a Symbol but String is given

The fix seems to be not accessing variables in dot notation and instead I extended the class to include:

def is_locked? !self[:lockoutTime].nil? && self[:lockoutTime].to_i != 0 end

def is_disabled? self[:userAccountControl].to_i & UAC_ACCOUNT_DISABLED != 0 end

Anyone else getting this error? I am running ruby 2.3 by the way

nextgenappsllc avatar Feb 02 '16 09:02 nextgenappsllc

Yes, getting this error too. Running Ruby 2.3.1.

arohr avatar Jan 06 '17 17:01 arohr

Also getting this error on 2.3.4

cmoylan avatar Apr 11 '17 18:04 cmoylan