Skip to content

Instantly share code, notes, and snippets.

@pol
Created March 4, 2009 22:39
Show Gist options
  • Select an option

  • Save pol/74057 to your computer and use it in GitHub Desktop.

Select an option

Save pol/74057 to your computer and use it in GitHub Desktop.
# returns true if the user authenticates to the LDAP server with the
# provided password
#
def ldap_authenticated?(password)
SimpleLdapAuthenticator.valid?(self.login, password)
end
def login=(value)
write_attribute :login, (value ? value.downcase : nil)
end
def email=(value)
write_attribute :email, (value ? value.downcase : nil)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment