Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OHR Support
Manage
Activity
Members
Labels
Plan
Issues
97
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
OHR Support
Commits
63c92189
Commit
63c92189
authored
14 years ago
by
Gregor Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
relaxing the test for mysql to make it work for mysql2 adapter
parent
98f85b33
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/models/user.rb
+1
-1
1 addition, 1 deletion
app/models/user.rb
with
1 addition
and
1 deletion
app/models/user.rb
+
1
−
1
View file @
63c92189
...
...
@@ -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
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment