def user_in_group?(attribs, dir_info)
      temp       = user_record_name_alternatives(attribs)
      username   = temp[:record_name]
      # pp username
      # pp attribs

      attribs    = group_record_name_alternatives(attribs)
      # groupname  = attribs[:record_name]
      attribs[:value] = username
      # pp attribs

      check_critical_attribute( attribs, :value, :username )
      check_critical_attribute( attribs, :record_name, :groupname )
      attribs    = tidy_attribs(attribs)

      command    = {action: 'read', scope: 'Groups', attribute: nil, value: nil}
      cmd_attribs = attribs.merge(command)

      dscl( cmd_attribs, dir_info )
    end
def user_in_group?(attribs, dir_info)
      temp       = user_record_name_alternatives(attribs)
      username   = temp[:record_name]
      # pp username
      # pp attribs

      attribs    = group_record_name_alternatives(attribs)
      # groupname  = attribs[:record_name]
      attribs[:value] = username
      # pp attribs

      check_critical_attribute( attribs, :value, :username )
      check_critical_attribute( attribs, :record_name, :groupname )
      attribs    = tidy_attribs(attribs)

      command    = {action: 'read', scope: 'Groups', attribute: nil, value: nil}
      cmd_attribs = attribs.merge(command)

      dscl( cmd_attribs, dir_info )
    end
dscl . -read /Groups/ladmins
 TODO: switch to dseditgroup -o checkmember -m username groupname
 dseditgroup -o checkmember -m btihen employee
   yes btihen is a member of employee
 dseditgroup -o checkmember -m btihen student
   no btihen is NOT a member of student