Project

General

Profile

Account case-sensitiveness problem ?

Added by Teddy L almost 16 years ago

Hi,

Is it normal to have a case-sensitiveness connection with SQLite3 database but not with MySQL ?
I think the method try_to_login in user class should use "LIKE" statement instead of "=" because this a huge problem when on_the_fly creation is on if "login" and "Login" aren't the same login.

And the uniqueness constraint in user class shouldn't be case-sensitive.

  validates_uniqueness_of :login, :if => Proc.new { |user| !user.login.blank? }, :case_sensitive => false
  validates_uniqueness_of :mail, :if => Proc.new { |user| !user.mail.blank? }, :case_sensitive => false

Regards,

Teddy