diff --git a/app/models/user.rb b/app/models/user.rb
index d7b1bfb6eff0106abfa7479da65ea29c5239f316..d2d68520f240595f7e640bc3ba9c02cb5980b5a2 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -279,7 +279,7 @@ class User < Principal
   # version.  Exact matches will be given priority.
   def self.find_by_login(login)
     # force string comparison to be case sensitive on MySQL
-    type_cast = (ActiveRecord::Base.connection.adapter_name == 'MySQL') ? 'BINARY' : ''
+    type_cast = (ActiveRecord::Base.connection.adapter_name =~ /mysql/) ? 'BINARY' : ''
     
     # First look for an exact match
     user = first(:conditions => ["#{type_cast} login = ?", login])