class User < ActiveLDAP::Base ldap_mapping :dnattr =>'uid', :prefix => 'ou=users',:classes => ['account','gidNumber','posixAccount','shadowAccount','top'] belongs_to :groups, :class_name => 'Group', :foreign_key => 'memberUid', :local_key => 'uid' end ================ @users = User.find_all(:attribute => 'title', :value => '07') ============================= for user in @users user_str = user the_user = User.new("#{user_str}") the_user.gidNumber #outputs nothing end This for loop above doesn't work. But this does... for user in @users user_str = user the_user = User.new('fietka') #where fietka is a valid ldap user the_user.gidNumber #outputs 20000 - fietka's groupID end